pub struct OptionChainSink(/* private fields */);Expand description
A feed’s destination for complete chain snapshots. Cheap to clone. Only the latest accepted rows and error are retained; updates never queue.
Implementations§
Source§impl OptionChainSink
impl OptionChainSink
Sourcepub fn push(&self, rows: Vec<OptionQuote>) -> Result<(), FeedError>
pub fn push(&self, rows: Vec<OptionQuote>) -> Result<(), FeedError>
Replace all rows, including clearing them with an empty snapshot, and wake the host.
Reject the whole snapshot with FeedError::InvalidData for an invalid field,
expiry outside the query or more than 100,000 rows. The error names the contract and
field, is exposed by OptionChain::error, and leaves the previous rows untouched.
A successful push clears the last error. Inactive sinks ignore pushes.
Sourcepub fn report_error(&self, error: FeedError)
pub fn report_error(&self, error: FeedError)
Report a feed failure and wake the host, retaining the last accepted rows. A historical request ends on a reported error; a live request can recover on a later push.
Trait Implementations§
Source§impl Clone for OptionChainSink
impl Clone for OptionChainSink
Source§fn clone(&self) -> OptionChainSink
fn clone(&self) -> OptionChainSink
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for OptionChainSink
impl !UnwindSafe for OptionChainSink
impl Freeze for OptionChainSink
impl Send for OptionChainSink
impl Sync for OptionChainSink
impl Unpin for OptionChainSink
impl UnsafeUnpin for OptionChainSink
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> 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