pub struct PnlFactorExceeded<T: Unsigned> {
pub pnl_factor: T::Signed,
pub max_pnl_factor: T,
pub pool_value: T,
}
Expand description
PnL factor exceeded.
Fields§
§pnl_factor: T::Signed
Current PnL factor.
max_pnl_factor: T
Max PnL factor.
pool_value: T
Current pool value.
Implementations§
Source§impl<T: Unsigned> PnlFactorExceeded<T>
impl<T: Unsigned> PnlFactorExceeded<T>
Sourcepub fn exceeded_pnl<const DECIMALS: u8>(&self) -> Option<T>where
T: CheckedSub + FixedPointOps<DECIMALS>,
pub fn exceeded_pnl<const DECIMALS: u8>(&self) -> Option<T>where
T: CheckedSub + FixedPointOps<DECIMALS>,
Get the exceeded pnl.
Auto Trait Implementations§
impl<T> Freeze for PnlFactorExceeded<T>
impl<T> RefUnwindSafe for PnlFactorExceeded<T>
impl<T> Send for PnlFactorExceeded<T>
impl<T> Sync for PnlFactorExceeded<T>
impl<T> Unpin for PnlFactorExceeded<T>
impl<T> UnwindSafe for PnlFactorExceeded<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more