Struct binance::futures::websockets::FuturesWebSockets
source · pub struct FuturesWebSockets<'a, WE> {
pub socket: Option<(WebSocketStream<MaybeTlsStream<TcpStream>>, Response)>,
/* private fields */
}
Fields§
§socket: Option<(WebSocketStream<MaybeTlsStream<TcpStream>>, Response)>
Implementations§
source§impl<'a, WE: DeserializeOwned> FuturesWebSockets<'a, WE>
impl<'a, WE: DeserializeOwned> FuturesWebSockets<'a, WE>
sourcepub fn new<Callback>(handler: Callback) -> FuturesWebSockets<'a, WE>
pub fn new<Callback>(handler: Callback) -> FuturesWebSockets<'a, WE>
sourcepub fn new_with_options<Callback>(
handler: Callback,
conf: Config
) -> FuturesWebSockets<'a, WE>
pub fn new_with_options<Callback>( handler: Callback, conf: Config ) -> FuturesWebSockets<'a, WE>
sourcepub async fn connect_multiple(&mut self, endpoints: Vec<String>) -> Result<()>
pub async fn connect_multiple(&mut self, endpoints: Vec<String>) -> Result<()>
Connect to multiple websocket endpoints N.B: WE has to be CombinedStreamEvent
sourcepub async fn disconnect(&mut self) -> Result<()>
pub async fn disconnect(&mut self) -> Result<()>
Disconnect from the endpoint
pub fn socket( &self ) -> &Option<(WebSocketStream<MaybeTlsStream<TcpStream>>, Response)>
pub async fn event_loop(&mut self, running: &AtomicBool) -> Result<()>
Auto Trait Implementations§
impl<'a, WE> !RefUnwindSafe for FuturesWebSockets<'a, WE>
impl<'a, WE> Send for FuturesWebSockets<'a, WE>
impl<'a, WE> !Sync for FuturesWebSockets<'a, WE>
impl<'a, WE> Unpin for FuturesWebSockets<'a, WE>
impl<'a, WE> !UnwindSafe for FuturesWebSockets<'a, WE>
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