pub struct BinanceFuturesDataWsFeedHandler { /* private fields */ }Expand description
Handler for Binance Futures WebSocket JSON streams.
Deserializes raw JSON into venue-specific types without performing domain conversion. The data and execution client layers own instrument lookups and Nautilus type construction.
Implementations§
Source§impl BinanceFuturesDataWsFeedHandler
impl BinanceFuturesDataWsFeedHandler
Sourcepub fn new(
signal: Arc<AtomicBool>,
cmd_rx: UnboundedReceiver<BinanceFuturesWsStreamsCommand>,
raw_rx: UnboundedReceiver<Vec<u8>>,
out_tx: UnboundedSender<BinanceFuturesWsStreamsMessage>,
subscriptions_state: SubscriptionState,
request_id_counter: Arc<AtomicU64>,
) -> Self
pub fn new( signal: Arc<AtomicBool>, cmd_rx: UnboundedReceiver<BinanceFuturesWsStreamsCommand>, raw_rx: UnboundedReceiver<Vec<u8>>, out_tx: UnboundedSender<BinanceFuturesWsStreamsMessage>, subscriptions_state: SubscriptionState, request_id_counter: Arc<AtomicU64>, ) -> Self
Creates a new handler instance.
Sourcepub async fn next(&mut self) -> Option<BinanceFuturesWsStreamsMessage>
pub async fn next(&mut self) -> Option<BinanceFuturesWsStreamsMessage>
Returns the next message from the handler.
Processes both commands and raw WebSocket messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BinanceFuturesDataWsFeedHandler
impl !RefUnwindSafe for BinanceFuturesDataWsFeedHandler
impl Send for BinanceFuturesDataWsFeedHandler
impl Sync for BinanceFuturesDataWsFeedHandler
impl Unpin for BinanceFuturesDataWsFeedHandler
impl UnsafeUnpin for BinanceFuturesDataWsFeedHandler
impl !UnwindSafe for BinanceFuturesDataWsFeedHandler
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<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