pub struct Uuid(/* private fields */);Implementations§
Source§impl Uuid
impl Uuid
pub fn encode_lower<'buf>(&self, buffer: &'buf mut [u8]) -> &'buf mut str
pub const fn encode_buffer() -> [u8; 36]
Source§impl Uuid
impl Uuid
Sourcepub fn new_v7() -> Uuid
pub fn new_v7() -> Uuid
Create a new version 7 UUID using a time value and random bytes.
When the std feature is enabled, you can also use Uuid::new_v7.
Note that usage of this method requires the v7 feature of this crate
to be enabled.
§References
pub fn new_v7_with_timestamp(unix_millis: u64) -> Self
Source§impl Uuid
impl Uuid
Sourcepub const fn nil() -> Uuid
pub const fn nil() -> Uuid
pub const fn get_version(&self) -> Option<Version>
pub const fn is_nil(&self) -> bool
pub const fn as_u128(&self) -> u128
pub const fn from_u128(v: u128) -> Self
pub const fn from_bytes(bytes: [u8; 16]) -> Uuid
pub const fn as_bytes(&self) -> &[u8; 16]
pub fn from_slice(b: &[u8]) -> Result<Uuid, Error>
pub fn parse_str(input: &str) -> Result<Uuid, Error>
Trait Implementations§
impl Copy for Uuid
Source§impl<'de> Deserialize<'de> for Uuid
impl<'de> Deserialize<'de> for Uuid
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Uuid
Source§impl Ord for Uuid
impl Ord for Uuid
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 PartialOrd for Uuid
impl PartialOrd for Uuid
impl StructuralPartialEq for Uuid
Auto Trait Implementations§
impl Freeze for Uuid
impl RefUnwindSafe for Uuid
impl Send for Uuid
impl Sync for Uuid
impl Unpin for Uuid
impl UnsafeUnpin for Uuid
impl UnwindSafe for Uuid
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