pub struct Identifier<T>(/* private fields */);
Expand description
A Uuid identifier for an instance of generic type T
.
Implementations§
Source§impl<T> Identifier<T>
impl<T> Identifier<T>
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs a new unique/random Identifier.
Sourcepub const fn cast<O>(&self) -> Identifier<O>
pub const fn cast<O>(&self) -> Identifier<O>
Casts this Identifier into one of a different type.
Sourcepub const fn as_u128(&self) -> u128
pub const fn as_u128(&self) -> u128
The raw 128-bit number associated with this Identifier.
This is mostly for serialization purposes.
Trait Implementations§
Source§impl<T> Clone for Identifier<T>
impl<T> Clone for Identifier<T>
Source§impl<T: Debug> Debug for Identifier<T>
impl<T: Debug> Debug for Identifier<T>
Source§impl<T> Display for Identifier<T>
impl<T> Display for Identifier<T>
Source§impl<T> From<Uuid> for Identifier<T>
impl<T> From<Uuid> for Identifier<T>
Source§impl<T> From<u128> for Identifier<T>
impl<T> From<u128> for Identifier<T>
Source§impl<T> Hash for Identifier<T>
impl<T> Hash for Identifier<T>
Source§impl<T> Ord for Identifier<T>
impl<T> Ord for Identifier<T>
Source§impl<T> PartialEq for Identifier<T>
impl<T> PartialEq for Identifier<T>
Source§impl<T> PartialOrd for Identifier<T>
impl<T> PartialOrd for Identifier<T>
impl<T> Copy for Identifier<T>
impl<T> Eq for Identifier<T>
Auto Trait Implementations§
impl<T> Freeze for Identifier<T>
impl<T> RefUnwindSafe for Identifier<T>where
T: RefUnwindSafe,
impl<T> Send for Identifier<T>where
T: Send,
impl<T> Sync for Identifier<T>where
T: Sync,
impl<T> Unpin for Identifier<T>where
T: Unpin,
impl<T> UnwindSafe for Identifier<T>where
T: UnwindSafe,
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