Layout

Struct Layout 

Source
pub struct Layout {
    pub field_low: u32,
    pub field_mid: u16,
    pub field_high_and_version: u16,
    pub clock_seq_high_and_reserved: u8,
    pub clock_seq_low: u8,
    pub node: [u8; 6],
}
Expand description

The UUID format is 16 octets.

Fields§

§field_low: u32

The low field of the Timestamp.

§field_mid: u16

The mid field of the Timestamp.

§field_high_and_version: u16

The high field of the Timestamp multiplexed with the version number.

§clock_seq_high_and_reserved: u8

The high field of the ClockSeq multiplexed with the variant.

§clock_seq_low: u8

The low field of the ClockSeq.

§node: [u8; 6]

IEEE 802 MAC address.

Implementations§

Source§

impl Layout

Source

pub fn as_fields(&self) -> (u32, u16, u16, u16, u64)

Returns the five field values of the UUID in big-endian order.

Source

pub fn as_bytes(&self) -> UUID

Returns a byte slice of this UUID content.

Source

pub fn get_version(&self) -> Option<Version>

Get the version of the current generated UUID.

Source

pub fn get_variant(&self) -> Option<Variant>

Get the variant field of the current generated UUID.

Source

pub fn get_time(&self) -> u64

Get timestamp where UUID generated in.

Source

pub fn get_mac(&self) -> Node

Get the MAC-address where UUID generated with.

Trait Implementations§

Source§

impl Debug for Layout

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Layout

Source§

fn eq(&self, other: &Layout) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Layout

Auto Trait Implementations§

§

impl Freeze for Layout

§

impl RefUnwindSafe for Layout

§

impl Send for Layout

§

impl Sync for Layout

§

impl Unpin for Layout

§

impl UnwindSafe for Layout

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V