pub struct WsClient { /* private fields */ }
Expand description
A test client for Websocket filters.
Implementations
sourceimpl WsClient
impl WsClient
sourcepub async fn send_text(&mut self, text: impl Into<String>)
pub async fn send_text(&mut self, text: impl Into<String>)
Send a “text” websocket message to the server.
sourcepub async fn recv(&mut self) -> Result<Message, WsError>
pub async fn recv(&mut self) -> Result<Message, WsError>
Receive a websocket message from the server.
sourcepub async fn recv_closed(&mut self) -> Result<(), WsError>
pub async fn recv_closed(&mut self) -> Result<(), WsError>
Assert the server has closed the connection.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for WsClient
impl Send for WsClient
impl Sync for WsClient
impl Unpin for WsClient
impl !UnwindSafe for WsClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self