pub struct StrategyProfitBounds {
pub max_loss: Option<ProfitBound>,
pub max_profit: Option<ProfitBound>,
}
Fields§
§max_loss: Option<ProfitBound>
§max_profit: Option<ProfitBound>
Implementations§
Source§impl StrategyProfitBounds
impl StrategyProfitBounds
pub fn to_percentage_of_max_profit(&self, profit: Rational64) -> Option<f64>
Trait Implementations§
Source§impl Clone for StrategyProfitBounds
impl Clone for StrategyProfitBounds
Source§fn clone(&self) -> StrategyProfitBounds
fn clone(&self) -> StrategyProfitBounds
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StrategyProfitBounds
impl Debug for StrategyProfitBounds
Source§impl PartialEq for StrategyProfitBounds
impl PartialEq for StrategyProfitBounds
impl Eq for StrategyProfitBounds
impl StructuralPartialEq for StrategyProfitBounds
Auto Trait Implementations§
impl Freeze for StrategyProfitBounds
impl RefUnwindSafe for StrategyProfitBounds
impl Send for StrategyProfitBounds
impl Sync for StrategyProfitBounds
impl Unpin for StrategyProfitBounds
impl UnwindSafe for StrategyProfitBounds
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.