pub struct WebSocketClient { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new(name: &str, cfg: &WebSocketClientConfig) -> Self
pub async fn stop(&self) -> Result<(), SendError<()>>
pub fn with_message_handler<F, Fut>(self, h: F) -> Self
pub fn with_error_handler<F, Fut>(self, h: F) -> Self
pub fn with_ping_payload<F, Fut>(self, h: F) -> Self
pub async fn send_message(&self, msg: Message)
pub async fn run(&self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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