pub enum HandlerCommand {
SetClient(WebSocketClient),
Disconnect,
Authenticate {
payload: SecretString,
},
Subscribe {
topics: Vec<String>,
},
SubscribeBook {
payload: String,
gate: SnapshotGate,
completion: Sender<BybitWsResult<()>>,
},
Unsubscribe {
topics: Vec<String>,
},
ResubscribeBook {
topic: String,
cancel: CancellationToken,
gate: SnapshotGate,
completion: Sender<BybitWsResult<()>>,
},
SendOrder {
command: BybitWsOrderCommand,
},
SendOrders {
commands: Vec<BybitWsOrderCommand>,
},
}Expand description
Commands sent from the outer client to the inner message handler.
Variants§
SetClient(WebSocketClient)
Disconnect
Authenticate
Fields
§
payload: SecretStringSubscribe
SubscribeBook
Subscribes to a book topic, opening gate once the connection confirms the write.
A queued write always runs, since another subscription can hold the same topic.
Unsubscribe
ResubscribeBook
Replaces a book subscription on the current connection, opening gate once both writes
complete.
SendOrder
Fields
§
command: BybitWsOrderCommandSendOrders
Fields
§
commands: Vec<BybitWsOrderCommand>Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HandlerCommand
impl !UnwindSafe for HandlerCommand
impl Forget for HandlerCommand
impl Freeze for HandlerCommand
impl Send for HandlerCommand
impl Sync for HandlerCommand
impl Unpin for HandlerCommand
impl UnsafeUnpin 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