pub struct Uuid(/* private fields */);Expand description
A 128-bit universally unique identifier used by component profile data.
Parsing and formatting are delegated to the uuid crate; the wrapper
exists to support the custom serde representations used by text components
(a string, a four-integer list, or an NBT int array).
Implementations§
Source§impl Uuid
impl Uuid
Sourcepub fn from_bytes(bytes: [u8; 16]) -> Self
pub fn from_bytes(bytes: [u8; 16]) -> Self
Creates a UUID from its 16 bytes in network order.
Sourcepub fn into_bytes(self) -> [u8; 16]
pub fn into_bytes(self) -> [u8; 16]
Returns the UUID as 16 bytes in network order.
Sourcepub fn parse(value: &str) -> Result<Self, InvalidUuid>
pub fn parse(value: &str) -> Result<Self, InvalidUuid>
Parses a compact or hyphenated hexadecimal UUID string.
Trait Implementations§
impl Copy for Uuid
Source§impl<'de> Deserialize<'de> for Uuid
impl<'de> Deserialize<'de> for Uuid
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq 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