pub struct BinanceWsHandler { /* private fields */ }Available on crate feature
binance only.Implementations§
Source§impl BinanceWsHandler
impl BinanceWsHandler
pub fn new(options: BinanceOptions) -> Self
Trait Implementations§
Source§impl Clone for BinanceWsHandler
impl Clone for BinanceWsHandler
Source§fn clone(&self) -> BinanceWsHandler
fn clone(&self) -> BinanceWsHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BinanceWsHandler
impl Debug for BinanceWsHandler
Source§impl WsHandler for BinanceWsHandler
impl WsHandler for BinanceWsHandler
Source§fn config(&self) -> Result<WsConfig, UrlError>
fn config(&self) -> Result<WsConfig, UrlError>
Returns a WsConfig that will be applied for all WebSocket connections handled by this handler.
Source§fn handle_auth(&mut self) -> Result<Vec<Message>, WsError>
fn handle_auth(&mut self) -> Result<Vec<Message>, WsError>
Called when the WsConnection is created and on reconnection. Returned messages will be sent back to the server as-is. Read more
fn handle_subscribe( &mut self, topics: HashSet<Topic>, ) -> Result<Vec<Message>, WsError>
Source§fn handle_jrpc(&mut self, jrpc: Value) -> Result<ResponseOrContent, WsError>
fn handle_jrpc(&mut self, jrpc: Value) -> Result<ResponseOrContent, WsError>
Called when the WsConnection received a JSON-RPC value, returns messages to be sent to the server or the content with parsed event name. If not the desired content and no respose is to be sent (like after a confirmation for a subscription), return a Response with an empty Vec.
Auto Trait Implementations§
impl Freeze for BinanceWsHandler
impl RefUnwindSafe for BinanceWsHandler
impl Send for BinanceWsHandler
impl Sync for BinanceWsHandler
impl Unpin for BinanceWsHandler
impl UnwindSafe for BinanceWsHandler
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