pub struct Specialty(/* private fields */);Expand description
A specialty label identifying a kind of agent expertise.
Implementations§
Source§impl Specialty
impl Specialty
Sourcepub fn new(raw: impl Into<String>) -> Result<Self, DomainError>
pub fn new(raw: impl Into<String>) -> Result<Self, DomainError>
Construct a specialty after validating it.
Accepts any non-empty, non-whitespace-only label up to
MAX_SPECIALTY_LEN chars, free of control characters. The
label is trimmed.
pub fn as_str(&self) -> &str
pub fn into_inner(self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Specialty
impl<'de> Deserialize<'de> for Specialty
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 Specialty
Source§impl Ord for Specialty
impl Ord for Specialty
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Specialty
impl PartialOrd for Specialty
impl StructuralPartialEq for Specialty
Auto Trait Implementations§
impl Freeze for Specialty
impl RefUnwindSafe for Specialty
impl Send for Specialty
impl Sync for Specialty
impl Unpin for Specialty
impl UnsafeUnpin for Specialty
impl UnwindSafe for Specialty
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