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