Struct jsonrpc_utils::stream::StreamServerConfig
source · [−]pub struct StreamServerConfig { /* private fields */ }
Implementations
sourceimpl StreamServerConfig
impl StreamServerConfig
sourcepub fn with_channel_size(self, channel_size: usize) -> Self
pub fn with_channel_size(self, channel_size: usize) -> Self
sourcepub fn with_pipeline_size(self, pipeline_size: usize) -> Self
pub fn with_pipeline_size(self, pipeline_size: usize) -> Self
Set maximum request pipelining.
Up to pipeline_size
number of requests will be handled concurrently.
Default is 1, i.e. no pipelining.
Panics
if pipeline_size
is 0.
sourcepub fn with_keep_alive(self, keep_alive: bool) -> Self
pub fn with_keep_alive(self, keep_alive: bool) -> Self
Set whether keep alive is enabled.
Default is false.
sourcepub fn with_keep_alive_duration(self, keep_alive_duration: Duration) -> Self
pub fn with_keep_alive_duration(self, keep_alive_duration: Duration) -> Self
Wait for keep_alive_duration
after the last message is received, then
close the connection.
Default is 60 seconds.
sourcepub fn with_ping_interval(self, ping_interval: Duration) -> Self
pub fn with_ping_interval(self, ping_interval: Duration) -> Self
Set interval to send ping messages.
Default is 19 seconds.
Trait Implementations
sourceimpl Clone for StreamServerConfig
impl Clone for StreamServerConfig
sourcefn clone(&self) -> StreamServerConfig
fn clone(&self) -> StreamServerConfig
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 more
Auto Trait Implementations
impl RefUnwindSafe for StreamServerConfig
impl Send for StreamServerConfig
impl Sync for StreamServerConfig
impl Unpin for StreamServerConfig
impl UnwindSafe for StreamServerConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more