Struct xid::Id[][src]

pub struct Id(pub [u8; 12]);

An ID.

Implementations

impl Id[src]

#[must_use]pub fn as_bytes(&self) -> &[u8; 12][src]

The binary representation of the id.

#[must_use]pub fn machine(&self) -> [u8; 3][src]

Extract the 3-byte machine id.

#[must_use]pub fn pid(&self) -> u16[src]

Extract the process id.

#[must_use]pub fn time(&self) -> SystemTime[src]

Extract the timestamp.

#[must_use]pub fn counter(&self) -> u32[src]

Extract the incrementing counter.

Trait Implementations

impl Clone for Id[src]

impl Copy for Id[src]

impl Debug for Id[src]

impl Eq for Id[src]

impl FromStr for Id[src]

type Err = ParseIdError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

Create an Id from its string representation.

impl Hash for Id[src]

impl Ord for Id[src]

impl PartialEq<Id> for Id[src]

impl PartialOrd<Id> for Id[src]

impl StructuralEq for Id[src]

impl StructuralPartialEq for Id[src]

impl ToString for Id[src]

fn to_string(&self) -> String[src]

Returns the string representation of the id.

Auto Trait Implementations

impl RefUnwindSafe for Id[src]

impl Send for Id[src]

impl Sync for Id[src]

impl Unpin for Id[src]

impl UnwindSafe for Id[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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