Struct lfest::Position [−][src]
pub struct Position { /* fields omitted */ }
Expand description
Describes the position information of the account
Implementations
impl Position
[src]
impl Position
[src]pub fn new_all_fields(
size: f64,
value: f64,
entry_price: f64,
leverage: f64,
unrealized_pnl: f64
) -> Self
[src]
pub fn new_all_fields(
size: f64,
value: f64,
entry_price: f64,
leverage: f64,
unrealized_pnl: f64
) -> Self
[src]Create a new position with all fields custom. NOTE: only for advanced use cases
pub fn entry_price(&self) -> f64
[src]
pub fn entry_price(&self) -> f64
[src]Return the entry price of the position
pub fn unrealized_pnl(&self) -> f64
[src]
pub fn unrealized_pnl(&self) -> f64
[src]Return the positions unrealized profit and loss, denoted in BASE currency
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more