pub struct Usecase(/* private fields */);Expand description
A validated, case-sensitive name for an Objectstore workload.
Names must be 3–64 ASCII characters from [A-Za-z0-9_-]. Any permitted
character may appear in any position, including names consisting entirely of
underscores or hyphens. Names are never normalized.
Construction and deserialization both validate the name. The contents cannot be mutated after construction.
use objectstore_types::usecase::Usecase;
let name = Usecase::new("debug-files")?;
assert_eq!(name.as_str(), "debug-files");
assert!(Usecase::new("testing/org=999/injected").is_err());Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Usecase
impl<'de> Deserialize<'de> for Usecase
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Usecase
Source§impl Ord for Usecase
impl Ord for Usecase
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Usecase
impl PartialOrd for Usecase
impl StructuralPartialEq for Usecase
Auto Trait Implementations§
impl Freeze for Usecase
impl RefUnwindSafe for Usecase
impl Send for Usecase
impl Sync for Usecase
impl Unpin for Usecase
impl UnsafeUnpin for Usecase
impl UnwindSafe for Usecase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more