#[repr(C)]pub struct QuoteAtomsPerBaseAtom { /* private fields */ }Implementations§
Source§impl QuoteAtomsPerBaseAtom
impl QuoteAtomsPerBaseAtom
pub const ZERO: Self
pub const MIN: Self
pub const MAX: Self
pub const MIN_EXP: i8 = -18i8
pub const MAX_EXP: i8 = 8i8
pub fn multiply_spread(self, spread_e_5: u32) -> Self
pub fn divide_spread(self, spread_e_5: u32) -> Self
pub fn try_from_mantissa_and_exponent( mantissa: u32, exponent: i8, ) -> Result<Self, PriceConversionError>
pub fn checked_base_for_quote( self, quote_atoms: QuoteAtoms, round_up: bool, ) -> Result<BaseAtoms, ProgramError>
pub fn checked_quote_for_base( self, other: BaseAtoms, round_up: bool, ) -> Result<QuoteAtoms, ProgramError>
Trait Implementations§
Source§impl BorshDeserialize for QuoteAtomsPerBaseAtom
impl BorshDeserialize for QuoteAtomsPerBaseAtom
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl Clone for QuoteAtomsPerBaseAtom
impl Clone for QuoteAtomsPerBaseAtom
Source§fn clone(&self) -> QuoteAtomsPerBaseAtom
fn clone(&self) -> QuoteAtomsPerBaseAtom
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 QuoteAtomsPerBaseAtom
impl Debug for QuoteAtomsPerBaseAtom
Source§impl Default for QuoteAtomsPerBaseAtom
impl Default for QuoteAtomsPerBaseAtom
Source§fn default() -> QuoteAtomsPerBaseAtom
fn default() -> QuoteAtomsPerBaseAtom
Returns the “default value” for a type. Read more
Source§impl Display for QuoteAtomsPerBaseAtom
impl Display for QuoteAtomsPerBaseAtom
Source§impl Ord for QuoteAtomsPerBaseAtom
impl Ord for QuoteAtomsPerBaseAtom
Source§impl PartialEq for QuoteAtomsPerBaseAtom
impl PartialEq for QuoteAtomsPerBaseAtom
Source§impl PartialOrd for QuoteAtomsPerBaseAtom
impl PartialOrd for QuoteAtomsPerBaseAtom
Source§impl TryFrom<f64> for QuoteAtomsPerBaseAtom
impl TryFrom<f64> for QuoteAtomsPerBaseAtom
impl Copy for QuoteAtomsPerBaseAtom
impl Eq for QuoteAtomsPerBaseAtom
impl Pod for QuoteAtomsPerBaseAtom
Auto Trait Implementations§
impl Freeze for QuoteAtomsPerBaseAtom
impl RefUnwindSafe for QuoteAtomsPerBaseAtom
impl Send for QuoteAtomsPerBaseAtom
impl Sync for QuoteAtomsPerBaseAtom
impl Unpin for QuoteAtomsPerBaseAtom
impl UnwindSafe for QuoteAtomsPerBaseAtom
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DerefOrBorrow<T> for Twhere
T: ?Sized,
impl<T> DerefOrBorrow<T> for Twhere
T: ?Sized,
fn deref_or_borrow(&self) -> &T
Source§impl<T> DerefOrBorrowMut<T> for Twhere
T: ?Sized,
impl<T> DerefOrBorrowMut<T> for Twhere
T: ?Sized,
fn deref_or_borrow_mut(&mut self) -> &mut T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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