pub struct Configuration<TStreamConnector> { /* private fields */ }
Expand description
Configuration for a protosocket
rpc client.
Implementations§
Source§impl<TStreamConnector> Configuration<TStreamConnector>where
TStreamConnector: StreamConnector,
impl<TStreamConnector> Configuration<TStreamConnector>where
TStreamConnector: StreamConnector,
pub fn new(stream_connector: TStreamConnector) -> Self
Sourcepub fn max_buffer_length(&mut self, max_buffer_length: usize)
pub fn max_buffer_length(&mut self, max_buffer_length: usize)
Max buffer length limits the max message size. Try to use a buffer length that is at least 4 times the largest message you want to support.
Default: 4MiB
Sourcepub fn max_queued_outbound_messages(
&mut self,
max_queued_outbound_messages: usize,
)
pub fn max_queued_outbound_messages( &mut self, max_queued_outbound_messages: usize, )
Max messages that will be queued up waiting for send on the client channel.
Default: 256
Sourcepub fn buffer_allocation_increment(
&mut self,
buffer_allocation_increment: usize,
)
pub fn buffer_allocation_increment( &mut self, buffer_allocation_increment: usize, )
Amount of buffer to allocate at one time when buffer needs extension.
Default: 1MiB
Sourcepub fn tcp_keepalive_duration(
&mut self,
tcp_keepalive_duration: Option<Duration>,
)
pub fn tcp_keepalive_duration( &mut self, tcp_keepalive_duration: Option<Duration>, )
The duration to set for tcp_keepalive on the underlying socket.
Default: None
Trait Implementations§
Source§impl<TStreamConnector: Clone> Clone for Configuration<TStreamConnector>
impl<TStreamConnector: Clone> Clone for Configuration<TStreamConnector>
Source§fn clone(&self) -> Configuration<TStreamConnector>
fn clone(&self) -> Configuration<TStreamConnector>
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<TStreamConnector> Freeze for Configuration<TStreamConnector>where
TStreamConnector: Freeze,
impl<TStreamConnector> RefUnwindSafe for Configuration<TStreamConnector>where
TStreamConnector: RefUnwindSafe,
impl<TStreamConnector> Send for Configuration<TStreamConnector>where
TStreamConnector: Send,
impl<TStreamConnector> Sync for Configuration<TStreamConnector>where
TStreamConnector: Sync,
impl<TStreamConnector> Unpin for Configuration<TStreamConnector>where
TStreamConnector: Unpin,
impl<TStreamConnector> UnwindSafe for Configuration<TStreamConnector>where
TStreamConnector: UnwindSafe,
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