Struct levana_perpswap_cosmos::contracts::market::spot_price::events::SpotPriceEvent
source · pub struct SpotPriceEvent {
pub timestamp: Timestamp,
pub price_usd: PriceCollateralInUsd,
pub price_notional: Price,
pub price_base: PriceBaseInQuote,
pub publish_time: Option<Timestamp>,
pub publish_time_usd: Option<Timestamp>,
}Expand description
Event emited when a new spot price is added to the protocol.
Fields§
§timestamp: TimestampTimestamp of the update
price_usd: PriceCollateralInUsdPrice of the collateral asset in USD
price_notional: PricePrice of the notional asset in collateral, generated by the protocol
price_base: PriceBaseInQuotePrice of the base asset in quote
publish_time: Option<Timestamp>publish time, if available
publish_time_usd: Option<Timestamp>publish time, if available
Trait Implementations§
source§impl From<SpotPriceEvent> for Event
impl From<SpotPriceEvent> for Event
source§fn from(src: SpotPriceEvent) -> Self
fn from(src: SpotPriceEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SpotPriceEvent
impl RefUnwindSafe for SpotPriceEvent
impl Send for SpotPriceEvent
impl Sync for SpotPriceEvent
impl Unpin for SpotPriceEvent
impl UnwindSafe for SpotPriceEvent
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moresource§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> 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