pub struct UnitOfMeasureId(/* private fields */);Expand description
Strongly-typed unit of measure identifier.
Implementations§
Source§impl UnitOfMeasureId
impl UnitOfMeasureId
Sourcepub fn new() -> UnitOfMeasureId
Available on crate feature std only.
pub fn new() -> UnitOfMeasureId
std only.Create a new random ID (UUID v4).
Sourcepub const fn nil() -> UnitOfMeasureId
pub const fn nil() -> UnitOfMeasureId
Create a nil (all-zeros) ID.
Sourcepub const fn from_uuid(id: Uuid) -> UnitOfMeasureId
pub const fn from_uuid(id: Uuid) -> UnitOfMeasureId
Create from an existing Uuid.
Trait Implementations§
Source§impl AsRef<Uuid> for UnitOfMeasureId
impl AsRef<Uuid> for UnitOfMeasureId
Source§impl Clone for UnitOfMeasureId
impl Clone for UnitOfMeasureId
Source§fn clone(&self) -> UnitOfMeasureId
fn clone(&self) -> UnitOfMeasureId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UnitOfMeasureId
Source§impl Debug for UnitOfMeasureId
impl Debug for UnitOfMeasureId
Source§impl Default for UnitOfMeasureId
Available on crate feature std only.
impl Default for UnitOfMeasureId
Available on crate feature
std only.Source§fn default() -> UnitOfMeasureId
fn default() -> UnitOfMeasureId
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UnitOfMeasureId
impl<'de> Deserialize<'de> for UnitOfMeasureId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnitOfMeasureId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnitOfMeasureId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for UnitOfMeasureId
impl Display for UnitOfMeasureId
impl Eq for UnitOfMeasureId
Source§impl From<UnitOfMeasureId> for Uuid
impl From<UnitOfMeasureId> for Uuid
Source§fn from(id: UnitOfMeasureId) -> Uuid
fn from(id: UnitOfMeasureId) -> Uuid
Converts to this type from the input type.
Source§impl From<Uuid> for UnitOfMeasureId
impl From<Uuid> for UnitOfMeasureId
Source§fn from(id: Uuid) -> UnitOfMeasureId
fn from(id: Uuid) -> UnitOfMeasureId
Converts to this type from the input type.
Source§impl FromStr for UnitOfMeasureId
impl FromStr for UnitOfMeasureId
Source§impl Hash for UnitOfMeasureId
impl Hash for UnitOfMeasureId
Source§impl Ord for UnitOfMeasureId
impl Ord for UnitOfMeasureId
Source§fn cmp(&self, other: &UnitOfMeasureId) -> Ordering
fn cmp(&self, other: &UnitOfMeasureId) -> Ordering
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 PartialEq for UnitOfMeasureId
impl PartialEq for UnitOfMeasureId
Source§impl PartialOrd for UnitOfMeasureId
impl PartialOrd for UnitOfMeasureId
Source§impl Serialize for UnitOfMeasureId
impl Serialize for UnitOfMeasureId
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 UnitOfMeasureId
Auto Trait Implementations§
impl Freeze for UnitOfMeasureId
impl RefUnwindSafe for UnitOfMeasureId
impl Send for UnitOfMeasureId
impl Sync for UnitOfMeasureId
impl Unpin for UnitOfMeasureId
impl UnsafeUnpin for UnitOfMeasureId
impl UnwindSafe for UnitOfMeasureId
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