Struct engineio_rs::SocketBuilder
source · pub struct SocketBuilder { /* private fields */ }
Implementations
sourceimpl 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
sourceimpl Clone for SocketBuilder
impl Clone for SocketBuilder
sourcefn clone(&self) -> SocketBuilder
fn clone(&self) -> SocketBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for SocketBuilder
impl Send for SocketBuilder
impl Sync for SocketBuilder
impl Unpin for SocketBuilder
impl UnwindSafe for SocketBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more