Struct lfest::Margin[][src]

pub struct Margin { /* fields omitted */ }

Describes the margin information of the account

Implementations

impl Margin[src]

pub fn new_init(init_balance: f64) -> Self[src]

Create a new margin account with an initial balance denoted in BASE currency

pub fn new(
    wallet_balance: f64,
    position_margin: f64,
    order_margin: f64,
    available_balance: f64
) -> Self
[src]

Create a new Margin with all fields custom

pub fn wallet_balance(&self) -> f64[src]

Return the wallet balance of account

pub fn position_margin(&self) -> f64[src]

Return the position margin of account

pub fn order_margin(&self) -> f64[src]

Return the used order margin of account

pub fn available_balance(&self) -> f64[src]

Return the available balance of account

Trait Implementations

impl Clone for Margin[src]

impl Copy for Margin[src]

impl Debug for Margin[src]

Auto Trait Implementations

impl RefUnwindSafe for Margin

impl Send for Margin

impl Sync for Margin

impl Unpin for Margin

impl UnwindSafe for Margin

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.