pub struct Guid { /* private fields */ }Expand description
A 128-bit identifier.
Implementations§
Source§impl Guid
impl Guid
Sourcepub const fn new(a: u32, b: u16, c: u16, d: [u8; 8]) -> Guid
pub const fn new(a: u32, b: u16, c: u16, d: [u8; 8]) -> Guid
The identifier with the given groups.
Sourcepub const fn parse_const(text: &str) -> Guid
pub const fn parse_const(text: &str) -> Guid
Guid.Parse for a constant: a text that is not an identifier fails
the build.
Sourcepub fn parse(text: &str) -> Result<Guid, Error>
pub fn parse(text: &str) -> Result<Guid, Error>
Guid.Parse: a FormatException is Error::Format.
Sourcepub fn from_byte_array(bytes: &[u8]) -> Result<Guid, Error>
pub fn from_byte_array(bytes: &[u8]) -> Result<Guid, Error>
new Guid(byte[]): the layout of Guid::to_byte_array. Anything
but sixteen bytes is an ArgumentException.
Sourcepub fn to_byte_array(&self) -> [u8; 16]
pub fn to_byte_array(&self) -> [u8; 16]
Guid.ToByteArray: the first three groups little-endian, then the
last eight bytes in the order of the text.
Trait Implementations§
Source§impl BsonValue for Guid
impl BsonValue for Guid
impl Copy for Guid
impl Eq for Guid
Source§impl Ord for Guid
impl Ord for Guid
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Guid
impl PartialOrd for Guid
impl StructuralPartialEq for Guid
Auto Trait Implementations§
impl Freeze for Guid
impl RefUnwindSafe for Guid
impl Send for Guid
impl Sync for Guid
impl Unpin for Guid
impl UnsafeUnpin for Guid
impl UnwindSafe for Guid
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