pub struct StateId(pub String);Expand description
Prefixed newtype identifiers. See domain::ids.
Identifies a state record within a tenant (protocol §9).
Tuple Fields§
§0: StringImplementations§
Source§impl StateId
impl StateId
Sourcepub fn new(value: String) -> Result<StateId, DomainError>
pub fn new(value: String) -> Result<StateId, DomainError>
Constructs a validated StateId from its stc_-prefixed string form.
§Errors
Returns DomainError::InvalidId when value does not start with the
stc_ prefix, has an empty remainder, or exceeds MAX_ID_LENGTH
characters.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StateId
impl<'de> Deserialize<'de> for StateId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<StateId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<StateId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
impl Eq for StateId
Source§impl Ord for StateId
impl Ord for StateId
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 StateId
impl PartialOrd for StateId
Source§impl Serialize for StateId
impl Serialize for StateId
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for StateId
Source§impl TryFrom<&str> for StateId
impl TryFrom<&str> for StateId
Auto Trait Implementations§
impl Forget for StateId
impl Freeze for StateId
impl Move for StateId
impl RefUnwindSafe for StateId
impl Send for StateId
impl Sync for StateId
impl Unpin for StateId
impl UnsafeUnpin for StateId
impl UnwindSafe for StateId
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