pub enum HandlerCommand {
SetClient(WebSocketClient),
Subscribe(CoinbaseWsSubscription),
Unsubscribe(CoinbaseWsSubscription),
Disconnect,
InitializeInstruments(Vec<InstrumentAny>),
UpdateInstrument(Box<InstrumentAny>),
AddBarType {
key: String,
bar_type: BarType,
},
RemoveBarType {
key: String,
},
SetAccountId(AccountId),
}Expand description
Commands sent from super::client::CoinbaseWebSocketClient to the feed handler.
Variants§
SetClient(WebSocketClient)
Provides the network-level WebSocket client.
Subscribe(CoinbaseWsSubscription)
Subscribes to a channel for the given product IDs.
Unsubscribe(CoinbaseWsSubscription)
Unsubscribes from a channel.
Disconnect
Disconnects the WebSocket.
InitializeInstruments(Vec<InstrumentAny>)
Caches instruments for precision lookups during parsing.
UpdateInstrument(Box<InstrumentAny>)
Updates a single instrument in the cache.
AddBarType
Registers a bar type for candle parsing.
RemoveBarType
Removes a bar type registration.
SetAccountId(AccountId)
Sets the account ID used when emitting user-channel execution reports.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HandlerCommand
impl !RefUnwindSafe for HandlerCommand
impl Send for HandlerCommand
impl Sync for HandlerCommand
impl Unpin for HandlerCommand
impl UnsafeUnpin for HandlerCommand
impl !UnwindSafe for HandlerCommand
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