pub struct BinanceFuturesWsFeedHandler { /* private fields */ }Expand description
Handler for Binance Futures WebSocket JSON streams.
Implementations§
Source§impl BinanceFuturesWsFeedHandler
impl BinanceFuturesWsFeedHandler
Sourcepub fn new(
signal: Arc<AtomicBool>,
cmd_rx: UnboundedReceiver<BinanceFuturesHandlerCommand>,
raw_rx: UnboundedReceiver<Vec<u8>>,
out_tx: UnboundedSender<NautilusFuturesWsMessage>,
subscriptions_state: SubscriptionState,
request_id_counter: Arc<AtomicU64>,
) -> Self
pub fn new( signal: Arc<AtomicBool>, cmd_rx: UnboundedReceiver<BinanceFuturesHandlerCommand>, raw_rx: UnboundedReceiver<Vec<u8>>, out_tx: UnboundedSender<NautilusFuturesWsMessage>, subscriptions_state: SubscriptionState, request_id_counter: Arc<AtomicU64>, ) -> Self
Creates a new handler instance.
Sourcepub async fn next(&mut self) -> Option<NautilusFuturesWsMessage>
pub async fn next(&mut self) -> Option<NautilusFuturesWsMessage>
Returns the next message from the handler.
Processes both commands and raw WebSocket messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BinanceFuturesWsFeedHandler
impl !RefUnwindSafe for BinanceFuturesWsFeedHandler
impl Send for BinanceFuturesWsFeedHandler
impl Sync for BinanceFuturesWsFeedHandler
impl Unpin for BinanceFuturesWsFeedHandler
impl !UnwindSafe for BinanceFuturesWsFeedHandler
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