Struct dflake::Dflake[][src]

pub struct Dflake {
    pub timestamp: u32,
    pub worker_id: u8,
    pub process_id: u8,
    pub increment: u16,
    // some fields omitted
}

Structure holding a valid Discord snowflake.

Fields

timestamp: u32

Unix timestamp in miliseconds, represented as an u32.

worker_id: u8

Internal worker ID.

process_id: u8

Internal process ID.

increment: u16

The amount of times an ID was created on a process.

Implementations

impl Dflake[src]

pub fn raw(&self) -> u64[src]

Returns the raw u64 this Dflake was made from.

Trait Implementations

impl Clone for Dflake[src]

impl Copy for Dflake[src]

impl Debug for Dflake[src]

impl Eq for Dflake[src]

impl Ord for Dflake[src]

impl PartialEq<Dflake> for Dflake[src]

impl PartialOrd<Dflake> for Dflake[src]

impl StructuralEq for Dflake[src]

impl StructuralPartialEq for Dflake[src]

Auto Trait Implementations

impl RefUnwindSafe for Dflake

impl Send for Dflake

impl Sync for Dflake

impl Unpin for Dflake

impl UnwindSafe for Dflake

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.