Struct jsonrpsee_ws_client::client::WsClientBuilder[][src]

pub struct WsClientBuilder<'a> { /* fields omitted */ }

Configuration.

Implementations

impl<'a> WsClientBuilder<'a>[src]

pub fn max_request_body_size(self, size: usize) -> Self[src]

Set max request body size.

pub fn request_timeout(self, timeout: Option<Duration>) -> Self[src]

Set request timeout.

pub fn connection_timeout(self, timeout: Duration) -> Self[src]

Set connection timeout for the handshake.

pub fn origin_header(self, origin: Option<Cow<'a, str>>) -> Self[src]

Set origin header to pass during the handshake.

pub fn handshake_url(self, url: Cow<'a, str>) -> Self[src]

Set URL to send during the handshake.

pub fn max_concurrent_requests(self, max: usize) -> Self[src]

Set max concurrent requests.

pub fn max_notifs_per_subscription(self, max: usize) -> Self[src]

Set max concurrent notification capacity for each subscription; when the capacity is exceeded the subscription will be dropped.

You can also prevent the subscription being dropped by calling WsSubscription::next() frequently enough such that the buffer capacity doesn’t exceeds.

Note: The actual capacity is num_senders + max_subscription_capacity because it is passed to [futures::channel::mpsc::channel].

pub async fn build(self, url: &'a str) -> Result<WsClient, Error>[src]

Build the client with specified URL to connect to. If the port number is missing from the URL, the default port number is used.

ws://host - port 80 is used

wss://host - port 443 is used

Trait Implementations

impl<'a> Clone for WsClientBuilder<'a>[src]

impl<'a> Debug for WsClientBuilder<'a>[src]

impl<'a> Default for WsClientBuilder<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for WsClientBuilder<'a>

impl<'a> Send for WsClientBuilder<'a>

impl<'a> Sync for WsClientBuilder<'a>

impl<'a> Unpin for WsClientBuilder<'a>

impl<'a> UnwindSafe for WsClientBuilder<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,