pub enum DataResponse {
Data(CustomDataResponse),
Instrument(Box<InstrumentResponse>),
Instruments(InstrumentsResponse),
Book(BookResponse),
BookDeltas(BookDeltasResponse),
BookDepth(BookDepthResponse),
Quotes(QuotesResponse),
Trades(TradesResponse),
FundingRates(FundingRatesResponse),
ForwardPrices(ForwardPricesResponse),
Bars(BarsResponse),
}Variants§
Data(CustomDataResponse)
Instrument(Box<InstrumentResponse>)
Instruments(InstrumentsResponse)
Book(BookResponse)
BookDeltas(BookDeltasResponse)
BookDepth(BookDepthResponse)
Quotes(QuotesResponse)
Trades(TradesResponse)
FundingRates(FundingRatesResponse)
ForwardPrices(ForwardPricesResponse)
Bars(BarsResponse)
Implementations§
Source§impl DataResponse
impl DataResponse
pub fn correlation_id(&self) -> &UUID4
Sourcepub fn record_count(&self) -> Option<usize>
pub fn record_count(&self) -> Option<usize>
Returns the number of records carried by the response, where defined.
Returns None for singular or opaque variants (Data, Instrument, Book)
where a record count is not meaningful.
Sourcepub fn trim_to_bounds(&mut self)
pub fn trim_to_bounds(&mut self)
Trims vector payloads to the inclusive [start, end] window on ts_init.
Applies to variants whose payload elements implement HasTsInit
(BookDeltas, BookDepth, Quotes, Trades, FundingRates,
Bars, Instruments). Other variants are untouched: singular payloads
(Instrument, Book),
ForwardPrices (no per-item ts_init), and the opaque custom
Data variant.
Trait Implementations§
Source§impl Clone for DataResponse
impl Clone for DataResponse
Source§fn clone(&self) -> DataResponse
fn clone(&self) -> DataResponse
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 DataResponse
impl !UnwindSafe for DataResponse
impl Freeze for DataResponse
impl Send for DataResponse
impl Sync for DataResponse
impl Unpin for DataResponse
impl UnsafeUnpin for DataResponse
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