pub struct WsClient<F, T> { /* private fields */ }
Expand description
WebSocket
client builder
Implementations§
Source§impl WsClient<Base, ()>
impl WsClient<Base, ()>
Source§impl<F, T> WsClient<F, T>
impl<F, T> WsClient<F, T>
Sourcepub fn set_header<K, V>(&self, key: K, value: V) -> Result<(), HttpError>where
HeaderName: TryFrom<K>,
HeaderValue: TryFrom<V>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
<HeaderValue as TryFrom<V>>::Error: Into<HttpError>,
pub fn set_header<K, V>(&self, key: K, value: V) -> Result<(), HttpError>where
HeaderName: TryFrom<K>,
HeaderValue: TryFrom<V>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
<HeaderValue as TryFrom<V>>::Error: Into<HttpError>,
Insert a header, replaces existing header.
Source§impl<F, T> WsClient<F, T>
impl<F, T> WsClient<F, T>
Sourcepub async fn connect(&self) -> Result<WsConnection<F>, WsClientError>
pub async fn connect(&self) -> Result<WsConnection<F>, WsClientError>
Complete request construction and connect to a websockets server.
Trait Implementations§
Auto Trait Implementations§
impl<F, T> !Freeze for WsClient<F, T>
impl<F, T> !RefUnwindSafe for WsClient<F, T>
impl<F, T> !Send for WsClient<F, T>
impl<F, T> !Sync for WsClient<F, T>
impl<F, T> Unpin for WsClient<F, T>where
F: Unpin,
impl<F, T> !UnwindSafe for WsClient<F, T>
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