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