pub struct PredictedProfit(pub i128);Expand description
Profit predicted by simulation, in the smallest denominated unit of the relevant token (e.g. wei for ETH-denominated strategies).
Signed: a strategy can simulate a loss. The guard math (whitepaper
Section 4.1) excludes non-positive PredictedProfit values from the
ratio computation rather than assuming both sides are always positive.
Tuple Fields§
§0: i128Trait Implementations§
Source§impl Clone for PredictedProfit
impl Clone for PredictedProfit
Source§fn clone(&self) -> PredictedProfit
fn clone(&self) -> PredictedProfit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PredictedProfit
Source§impl Debug for PredictedProfit
impl Debug for PredictedProfit
Source§impl<'de> Deserialize<'de> for PredictedProfit
impl<'de> Deserialize<'de> for PredictedProfit
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PredictedProfit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PredictedProfit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PredictedProfit
Source§impl Hash for PredictedProfit
impl Hash for PredictedProfit
Source§impl Ord for PredictedProfit
impl Ord for PredictedProfit
Source§fn cmp(&self, other: &PredictedProfit) -> Ordering
fn cmp(&self, other: &PredictedProfit) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PredictedProfit
impl PartialEq for PredictedProfit
Source§impl PartialOrd for PredictedProfit
impl PartialOrd for PredictedProfit
Source§impl Serialize for PredictedProfit
impl Serialize for PredictedProfit
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PredictedProfit
Auto Trait Implementations§
impl Freeze for PredictedProfit
impl RefUnwindSafe for PredictedProfit
impl Send for PredictedProfit
impl Sync for PredictedProfit
impl Unpin for PredictedProfit
impl UnsafeUnpin for PredictedProfit
impl UnwindSafe for PredictedProfit
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