pub struct TransportConfig {
pub max_message_size: usize,
pub read_timeout_ms: u64,
pub write_timeout_ms: u64,
}Expand description
Builder for configuring transport options
Fields§
§max_message_size: usizeMaximum message size in bytes (default: 16MB)
read_timeout_ms: u64Read timeout in milliseconds (default: 30000)
write_timeout_ms: u64Write timeout in milliseconds (default: 30000)
Implementations§
Source§impl TransportConfig
impl TransportConfig
Sourcepub fn max_message_size(self, size: usize) -> Self
pub fn max_message_size(self, size: usize) -> Self
Set maximum message size
Sourcepub fn read_timeout(self, ms: u64) -> Self
pub fn read_timeout(self, ms: u64) -> Self
Set read timeout in milliseconds
Sourcepub fn write_timeout(self, ms: u64) -> Self
pub fn write_timeout(self, ms: u64) -> Self
Set write timeout in milliseconds
Trait Implementations§
Source§impl Clone for TransportConfig
impl Clone for TransportConfig
Source§fn clone(&self) -> TransportConfig
fn clone(&self) -> TransportConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransportConfig
impl Debug for TransportConfig
Auto Trait Implementations§
impl Freeze for TransportConfig
impl RefUnwindSafe for TransportConfig
impl Send for TransportConfig
impl Sync for TransportConfig
impl Unpin for TransportConfig
impl UnsafeUnpin for TransportConfig
impl UnwindSafe for TransportConfig
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