Enum lfest::FuturesTypes
source · [−]pub enum FuturesTypes {
Linear,
Inverse,
}
Expand description
Enumeration of different futures types
Variants
Linear
Linear futures with a linear payout profit and loss calculation: position_size * (exit_price - entry_price)
Inverse
Inverse futures allow the user to hold the collateral in BASE currency and speculating on price moves denoted in QUOTE currency Example would be Bitmex XBTUSD inverse perpetual futures. profit and loss calculation: position_size * (1.0 / entry_price - 1.0 / exit_price)
Implementations
Trait Implementations
sourceimpl Clone for FuturesTypes
impl Clone for FuturesTypes
sourcefn clone(&self) -> FuturesTypes
fn clone(&self) -> FuturesTypes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FuturesTypes
impl Debug for FuturesTypes
sourceimpl Default for FuturesTypes
impl Default for FuturesTypes
sourceimpl<'de> Deserialize<'de> for FuturesTypes
impl<'de> Deserialize<'de> for FuturesTypes
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for FuturesTypes
impl Display for FuturesTypes
sourceimpl FromStr for FuturesTypes
impl FromStr for FuturesTypes
sourceimpl Serialize for FuturesTypes
impl Serialize for FuturesTypes
impl Copy for FuturesTypes
Auto Trait Implementations
impl RefUnwindSafe for FuturesTypes
impl Send for FuturesTypes
impl Sync for FuturesTypes
impl Unpin for FuturesTypes
impl UnwindSafe for FuturesTypes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more