pub struct SocketBuilder { /* private fields */ }
Implementations§
Source§impl SocketBuilder
impl SocketBuilder
pub fn new(url: Url) -> Self
pub fn headers(self, headers: HeaderMap) -> Self
pub fn channel_buf(self, size: usize) -> Self
Sourcepub async fn build(self) -> Result<Socket, Error>
pub async fn build(self) -> Result<Socket, Error>
Build websocket if allowed, if not fall back to polling
Sourcepub async fn build_with_fallback(self) -> Result<Socket, Error>
pub async fn build_with_fallback(self) -> Result<Socket, Error>
Build websocket if allowed, if not allowed or errored fall back to polling. WARNING: websocket errors suppressed, no indication of websocket success or failure.
Sourcepub async fn build_websocket_with_upgrade(self) -> Result<Socket, Error>
pub async fn build_websocket_with_upgrade(self) -> Result<Socket, Error>
Build socket with a polling transport then upgrade to websocket transport
Sourcepub async fn build_websocket(self) -> Result<Socket, Error>
pub async fn build_websocket(self) -> Result<Socket, Error>
Build socket with only a websocket transport
pub async fn build_polling(self) -> Result<Socket, Error>
Trait Implementations§
Source§impl Clone for SocketBuilder
impl Clone for SocketBuilder
Source§fn clone(&self) -> SocketBuilder
fn clone(&self) -> SocketBuilder
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 moreAuto Trait Implementations§
impl Freeze for SocketBuilder
impl RefUnwindSafe for SocketBuilder
impl Send for SocketBuilder
impl Sync for SocketBuilder
impl Unpin for SocketBuilder
impl UnwindSafe for SocketBuilder
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