[][src]Enum nash_protocol::types::exchange::Nonce

pub enum Nonce {
    Value(u32),
    Crosschain,
}

Nonces are 32 bit integers. They increment over time such that data with lower nonces that has already been observed are rejected by the matching engine and smart contract.

Variants

Value(u32)
Crosschain

Implementations

impl Nonce[src]

pub fn to_be_bytes(&self) -> [u8; 4][src]

Serialize Nonce for ETH payload as BigEndian bytes

pub fn from_be_bytes(bytes: [u8; 4]) -> Result<Self>[src]

Create a nonce from ETH payload bytes

impl Nonce[src]

pub fn to_le_bytes(&self) -> [u8; 8][src]

Serialize Nonce for NEO payload as 8 bytes LittleEndian

impl Nonce[src]

pub fn crosschain() -> u32[src]

Trait Implementations

impl Clone for Nonce[src]

impl Copy for Nonce[src]

impl Debug for Nonce[src]

impl Eq for Nonce[src]

impl<'_> From<&'_ u32> for Nonce[src]

impl From<u32> for Nonce[src]

impl Hash for Nonce[src]

impl Into<i64> for Nonce[src]

impl Into<u32> for Nonce[src]

impl PartialEq<Nonce> for Nonce[src]

impl StructuralEq for Nonce[src]

impl StructuralPartialEq for Nonce[src]

Auto Trait Implementations

impl RefUnwindSafe for Nonce

impl Send for Nonce

impl Sync for Nonce

impl Unpin for Nonce

impl UnwindSafe for Nonce

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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.