pub struct ClientBuilder { /* private fields */ }Implementations§
Source§impl ClientBuilder
impl ClientBuilder
pub fn new(url: Url) -> Self
Sourcepub fn tls_config(self, tls_config: TlsConnector) -> Self
pub fn tls_config(self, tls_config: TlsConnector) -> Self
Specify transport’s tls config
Sourcepub async fn build(self) -> Result<Client, Error>
pub async fn build(self) -> Result<Client, Error>
Build websocket if allowed, if not fall back to polling
Sourcepub async fn build_polling(self) -> Result<Client, Error>
pub async fn build_polling(self) -> Result<Client, Error>
Build socket with polling transport
Sourcepub async fn build_websocket_with_upgrade(self) -> Result<Client, Error>
pub async fn build_websocket_with_upgrade(self) -> Result<Client, Error>
Build socket with a polling transport then upgrade to websocket transport
Sourcepub async fn build_websocket(self) -> Result<Client, Error>
pub async fn build_websocket(self) -> Result<Client, Error>
Build socket with only a websocket transport
Sourcepub async fn build_with_fallback(self) -> Result<Client, Error>
pub async fn build_with_fallback(self) -> Result<Client, 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.
Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
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 ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
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