pub struct PriceFeed {
pub feed_id: String,
pub feed_name: String,
pub feed_type: FeedType,
pub update_frequency: u64,
pub data_quality: DataQuality,
pub last_update: u64,
pub asset_id: String,
pub cached_prices: Vec<f64>,
}Expand description
Price feed
Fields§
§feed_id: String§feed_name: String§feed_type: FeedType§update_frequency: u64§data_quality: DataQuality§last_update: u64§asset_id: StringThe asset this feed serves. Used to associate a feed with an asset so
AssetManager::ingest_from_feed can look it up by asset_id.
cached_prices: Vec<f64>Cached price series (oldest first) fetched from the feed. When non-empty
this is used directly to populate an asset’s price_history; when empty,
ingest_from_feed falls back to a deterministic generator seeded from
feed_id (there is no real network in this scaffold).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PriceFeed
impl RefUnwindSafe for PriceFeed
impl Send for PriceFeed
impl Sync for PriceFeed
impl Unpin for PriceFeed
impl UnsafeUnpin for PriceFeed
impl UnwindSafe for PriceFeed
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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