pub struct TradesResponse {
pub correlation_id: UUID4,
pub client_id: ClientId,
pub instrument_ids: Vec<InstrumentId>,
pub data: BatchView<TradeTick>,
pub start: Option<UnixNanos>,
pub end: Option<UnixNanos>,
pub ts_init: UnixNanos,
pub params: Option<Params>,
}Fields§
§correlation_id: UUID4§client_id: ClientId§instrument_ids: Vec<InstrumentId>§data: BatchView<TradeTick>§start: Option<UnixNanos>§end: Option<UnixNanos>§ts_init: UnixNanos§params: Option<Params>Implementations§
Source§impl TradesResponse
impl TradesResponse
Sourcepub fn new(
correlation_id: UUID4,
client_id: ClientId,
instrument_ids: impl IntoInstrumentIds,
data: impl Into<BatchView<TradeTick>>,
start: Option<UnixNanos>,
end: Option<UnixNanos>,
ts_init: UnixNanos,
params: Option<Params>,
) -> Self
pub fn new( correlation_id: UUID4, client_id: ClientId, instrument_ids: impl IntoInstrumentIds, data: impl Into<BatchView<TradeTick>>, start: Option<UnixNanos>, end: Option<UnixNanos>, ts_init: UnixNanos, params: Option<Params>, ) -> Self
Creates a new TradesResponse instance.
Accepts an owned vector, a shared buffer, or a batch view.
§Panics
Panics if the identifier list is empty.
Sourcepub fn single_instrument_id(&self) -> Result<InstrumentId>
pub fn single_instrument_id(&self) -> Result<InstrumentId>
Returns the instrument ID for a single-member response path.
§Errors
Returns an error if the response does not contain exactly one member.
Trait Implementations§
Source§impl Clone for TradesResponse
impl Clone for TradesResponse
Source§impl Debug for TradesResponse
impl Debug for TradesResponse
Source§impl<'de> Deserialize<'de> for TradesResponse
impl<'de> Deserialize<'de> for TradesResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TradesResponse
impl RefUnwindSafe for TradesResponse
impl Send for TradesResponse
impl Sync for TradesResponse
impl Unpin for TradesResponse
impl UnsafeUnpin for TradesResponse
impl UnwindSafe for TradesResponse
Blanket Implementations§
impl<T> Allocation for T
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