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