Struct jsonrpsee_ws_client::client::WsConfig[][src]

pub struct WsConfig<'a> {
    pub url: &'a str,
    pub max_request_body_size: usize,
    pub request_timeout: Option<Duration>,
    pub connection_timeout: Duration,
    pub origin: Option<Cow<'a, str>>,
    pub handshake_url: Cow<'a, str>,
    pub max_concurrent_requests: usize,
    pub max_notifs_per_subscription: usize,
}

Configuration.

Fields

url: &'a str

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

max_request_body_size: usize

Max request body size

request_timeout: Option<Duration>

Request timeout

connection_timeout: Duration

Connection timeout

origin: Option<Cow<'a, str>>

Origin header to pass during the HTTP handshake. If None, no Origin header was passed.

handshake_url: Cow<'a, str>

Url to send during the HTTP handshake.

max_concurrent_requests: usize

Max concurrent request.

max_notifs_per_subscription: usize

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].

Implementations

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

pub fn with_url(url: &'a str) -> Self[src]

Default WebSocket configuration with a specified URL to connect to.

Trait Implementations

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

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

impl<'a> TryFrom<WsConfig<'a>> for WsTransportClientBuilder<'a>[src]

type Error = WsHandshakeError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a> RefUnwindSafe for WsConfig<'a>

impl<'a> Send for WsConfig<'a>

impl<'a> Sync for WsConfig<'a>

impl<'a> Unpin for WsConfig<'a>

impl<'a> UnwindSafe for WsConfig<'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>,