pub struct AbsolutePrice<IS: InstrumentSpec>(/* private fields */);Implementations§
Source§impl<IS: InstrumentSpec> AbsolutePrice<IS>
impl<IS: InstrumentSpec> AbsolutePrice<IS>
pub fn new(price: IS::PriceType) -> Self
pub fn as_protoabsolute_price(&self) -> ProtoabsolutePrice<IS>
pub fn into_protoabsolute_price(self) -> ProtoabsolutePrice<IS>
pub fn as_decimal(&self) -> Decimal
pub fn as_underlying(&self) -> IS::PriceType
Trait Implementations§
Source§impl<IS: InstrumentSpec> Add<&RelativePrice> for AbsolutePrice<IS>
impl<IS: InstrumentSpec> Add<&RelativePrice> for AbsolutePrice<IS>
Source§type Output = AbsolutePrice<IS>
type Output = AbsolutePrice<IS>
The resulting type after applying the
+ operator.Source§impl<IS: InstrumentSpec> Add<RelativePrice> for AbsolutePrice<IS>
impl<IS: InstrumentSpec> Add<RelativePrice> for AbsolutePrice<IS>
Source§type Output = AbsolutePrice<IS>
type Output = AbsolutePrice<IS>
The resulting type after applying the
+ operator.Source§impl<IS: InstrumentSpec> AddDecimal for AbsolutePrice<IS>
impl<IS: InstrumentSpec> AddDecimal for AbsolutePrice<IS>
fn add_decimal(&mut self, decimal: &Decimal)
Source§impl<IS: Clone + InstrumentSpec> Clone for AbsolutePrice<IS>
impl<IS: Clone + InstrumentSpec> Clone for AbsolutePrice<IS>
Source§fn clone(&self) -> AbsolutePrice<IS>
fn clone(&self) -> AbsolutePrice<IS>
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<IS: Copy + InstrumentSpec> Copy for AbsolutePrice<IS>
Source§impl<IS: InstrumentSpec> Debug for AbsolutePrice<IS>
impl<IS: InstrumentSpec> Debug for AbsolutePrice<IS>
Source§impl<IS: Default + InstrumentSpec> Default for AbsolutePrice<IS>
impl<IS: Default + InstrumentSpec> Default for AbsolutePrice<IS>
Source§fn default() -> AbsolutePrice<IS>
fn default() -> AbsolutePrice<IS>
Returns the “default value” for a type. Read more
Source§impl<IS: InstrumentSpec> Deref for AbsolutePrice<IS>
impl<IS: InstrumentSpec> Deref for AbsolutePrice<IS>
Source§impl<IS: InstrumentSpec> Display for AbsolutePrice<IS>
impl<IS: InstrumentSpec> Display for AbsolutePrice<IS>
impl<IS: Eq + InstrumentSpec> Eq for AbsolutePrice<IS>
Source§impl<IS: InstrumentSpec> From<&AbsolutePrice<IS>> for ProtoabsolutePrice<IS>
impl<IS: InstrumentSpec> From<&AbsolutePrice<IS>> for ProtoabsolutePrice<IS>
Source§fn from(value: &AbsolutePrice<IS>) -> Self
fn from(value: &AbsolutePrice<IS>) -> Self
Converts to this type from the input type.
Source§impl<IS: InstrumentSpec> From<AbsolutePrice<IS>> for ProtoabsolutePrice<IS>
impl<IS: InstrumentSpec> From<AbsolutePrice<IS>> for ProtoabsolutePrice<IS>
Source§fn from(value: AbsolutePrice<IS>) -> Self
fn from(value: AbsolutePrice<IS>) -> Self
Converts to this type from the input type.
Source§impl<IS: Hash + InstrumentSpec> Hash for AbsolutePrice<IS>
impl<IS: Hash + InstrumentSpec> Hash for AbsolutePrice<IS>
Source§impl<IS: Ord + InstrumentSpec> Ord for AbsolutePrice<IS>
impl<IS: Ord + InstrumentSpec> Ord for AbsolutePrice<IS>
Source§fn cmp(&self, other: &AbsolutePrice<IS>) -> Ordering
fn cmp(&self, other: &AbsolutePrice<IS>) -> 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<IS: PartialEq + InstrumentSpec> PartialEq for AbsolutePrice<IS>
impl<IS: PartialEq + InstrumentSpec> PartialEq for AbsolutePrice<IS>
Source§impl<IS: PartialOrd + InstrumentSpec> PartialOrd for AbsolutePrice<IS>where
IS::PriceType: PartialOrd,
impl<IS: PartialOrd + InstrumentSpec> PartialOrd for AbsolutePrice<IS>where
IS::PriceType: PartialOrd,
impl<IS: PartialEq + InstrumentSpec> StructuralPartialEq for AbsolutePrice<IS>
Source§impl<IS: InstrumentSpec> Sub<&RelativePrice> for AbsolutePrice<IS>
impl<IS: InstrumentSpec> Sub<&RelativePrice> for AbsolutePrice<IS>
Source§type Output = AbsolutePrice<IS>
type Output = AbsolutePrice<IS>
The resulting type after applying the
- operator.Source§impl<IS: InstrumentSpec> Sub<RelativePrice> for AbsolutePrice<IS>
impl<IS: InstrumentSpec> Sub<RelativePrice> for AbsolutePrice<IS>
Source§type Output = AbsolutePrice<IS>
type Output = AbsolutePrice<IS>
The resulting type after applying the
- operator.Source§impl<IS: InstrumentSpec> SubDecimal for AbsolutePrice<IS>
impl<IS: InstrumentSpec> SubDecimal for AbsolutePrice<IS>
fn sub_decimal(&mut self, decimal: &Decimal)
Auto Trait Implementations§
impl<IS> Freeze for AbsolutePrice<IS>
impl<IS> RefUnwindSafe for AbsolutePrice<IS>
impl<IS> Send for AbsolutePrice<IS>
impl<IS> Sync for AbsolutePrice<IS>
impl<IS> Unpin for AbsolutePrice<IS>
impl<IS> UnsafeUnpin for AbsolutePrice<IS>
impl<IS> UnwindSafe for AbsolutePrice<IS>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> Formattable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
impl<T> Parsable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.