pub struct ThingId(pub SmolStr);Expand description
Globally unique identifier of a Thing — namespace:name.
The format mirrors Eclipse Ditto: a non-empty namespace, a colon, and a
non-empty name. We do not enforce the regex at construction time (it
would force allocations on the failure path); use ThingId::is_valid
when accepting external input.
Tuple Fields§
§0: SmolStrImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ThingId
impl<'de> Deserialize<'de> for ThingId
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 ThingId
Source§impl Ord for ThingId
impl Ord for ThingId
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 ThingId
impl PartialOrd for ThingId
impl StructuralPartialEq for ThingId
Auto Trait Implementations§
impl Freeze for ThingId
impl RefUnwindSafe for ThingId
impl Send for ThingId
impl Sync for ThingId
impl Unpin for ThingId
impl UnsafeUnpin for ThingId
impl UnwindSafe for ThingId
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