[][src]Struct nash_protocol::protocol::State

pub struct State {
    pub signer: Option<Signer>,
    pub asset_nonces: Option<HashMap<String, Vec<u32>>>,
    pub markets: Option<HashMap<String, Market>>,
    pub assets: Option<Vec<Asset>>,
    pub remaining_orders: u64,
    pub affiliate_code: Option<String>,
}

Client state shared across the protocol.

Fields

signer: Option<Signer>asset_nonces: Option<HashMap<String, Vec<u32>>>markets: Option<HashMap<String, Market>>assets: Option<Vec<Asset>>remaining_orders: u64affiliate_code: Option<String>

Implementations

impl State[src]

pub fn new(keys_path: Option<&str>) -> Result<Self>[src]

pub fn from_key_data(secret: &str, session: &str) -> Result<Self>[src]

pub fn signer(&mut self) -> Result<&mut Signer>[src]

pub fn get_market(&self, market_name: &str) -> Result<Market>[src]

Trait Implementations

impl Debug for State[src]

Auto Trait Implementations

impl RefUnwindSafe for State

impl Send for State

impl Sync for State

impl Unpin for State

impl UnwindSafe for State

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> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

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> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

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.