pub struct Subscribed<InstrumentKey, Transport = WebSocket> {
pub transport: Transport,
pub map: Map<InstrumentKey>,
pub buffered_websocket_events: Vec<WsMessage>,
}Expand description
The outcome of a successful Subscriber::subscribe.
Fields§
§transport: TransportThe connection, or view of one, that the subscribed events arrive on.
map: Map<InstrumentKey>Each confirmed subscription’s identifier, mapped to its instrument key.
buffered_websocket_events: Vec<WsMessage>Frames that arrived during validation without being a confirmation, in arrival order —
typically the first events of an already-confirmed subscription. They are the stream’s first
input and must be processed before anything read from transport.
Raw WebSocket frames whatever the transport: a shared connection relays the frames it reads, so every stream parses its input the same way.
Trait Implementations§
Auto Trait Implementations§
impl<InstrumentKey, Transport> Freeze for Subscribed<InstrumentKey, Transport>
impl<InstrumentKey, Transport> RefUnwindSafe for Subscribed<InstrumentKey, Transport>
impl<InstrumentKey, Transport> Send for Subscribed<InstrumentKey, Transport>
impl<InstrumentKey, Transport> Sync for Subscribed<InstrumentKey, Transport>
impl<InstrumentKey, Transport> Unpin for Subscribed<InstrumentKey, Transport>
impl<InstrumentKey, Transport> UnsafeUnpin for Subscribed<InstrumentKey, Transport>
impl<InstrumentKey, Transport> UnwindSafe for Subscribed<InstrumentKey, Transport>
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<Instrument> DynamicAlpacaInstrument for Instrument
impl<Instrument> DynamicHyperliquidInstrument for Instrument
impl<Instrument> DynamicLseInstrument for Instrument
impl<Instrument> DynamicMassiveInstrument for Instrument
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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