Struct jsonrpsee_ws_client::client::WsClientBuilder [−][src]
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]
fn clone(&self) -> WsClientBuilder<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,