pub struct OraclePrice {
pub spot: UFix64<N9>,
pub conf: UFix64<N9>,
}Expand description
Validated oracle spot price and confidence interval.
Fields§
§spot: UFix64<N9>§conf: UFix64<N9>Implementations§
Source§impl OraclePrice
impl OraclePrice
Sourcepub fn price_range(&self) -> Result<PriceRange<N9>, CoreError>
pub fn price_range(&self) -> Result<PriceRange<N9>, CoreError>
Builds a price range from validated spot and confidence.
§Errors
- Arithmetic overflow from
PriceRange::from_conf
Trait Implementations§
Source§impl Clone for OraclePrice
impl Clone for OraclePrice
impl Copy for OraclePrice
Source§impl Debug for OraclePrice
impl Debug for OraclePrice
impl Eq for OraclePrice
Source§impl PartialEq for OraclePrice
impl PartialEq for OraclePrice
impl StructuralPartialEq for OraclePrice
Auto Trait Implementations§
impl Freeze for OraclePrice
impl RefUnwindSafe for OraclePrice
impl Send for OraclePrice
impl Sync for OraclePrice
impl Unpin for OraclePrice
impl UnsafeUnpin for OraclePrice
impl UnwindSafe for OraclePrice
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<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