pub struct StreamConfig {
pub max_uni_streams: u32,
pub max_bi_streams: u32,
pub recv_buffer: usize,
pub send_buffer: usize,
pub max_data: u64,
}Available on crate feature
quic only.Expand description
Stream multiplexing configuration.
Fields§
§max_uni_streams: u32Maximum concurrent unidirectional streams.
Default: 100.
max_bi_streams: u32Maximum concurrent bidirectional streams.
Default: 100.
recv_buffer: usizeReceive buffer size per stream.
Default: 64KB.
send_buffer: usizeSend buffer size per stream.
Default: 64KB.
max_data: u64Maximum data per stream.
Default: 1MB.
Implementations§
Source§impl StreamConfig
impl StreamConfig
Sourcepub fn with_max_uni_streams(self, max: u32) -> Self
pub fn with_max_uni_streams(self, max: u32) -> Self
Builder method to set max unidirectional streams.
Sourcepub fn with_max_bi_streams(self, max: u32) -> Self
pub fn with_max_bi_streams(self, max: u32) -> Self
Builder method to set max bidirectional streams.
Sourcepub fn with_recv_buffer(self, size: usize) -> Self
pub fn with_recv_buffer(self, size: usize) -> Self
Builder method to set receive buffer size.
Sourcepub fn with_send_buffer(self, size: usize) -> Self
pub fn with_send_buffer(self, size: usize) -> Self
Builder method to set send buffer size.
Sourcepub fn with_max_data(self, max: u64) -> Self
pub fn with_max_data(self, max: u64) -> Self
Builder method to set max data per stream.
Trait Implementations§
Source§impl Clone for StreamConfig
impl Clone for StreamConfig
Source§fn clone(&self) -> StreamConfig
fn clone(&self) -> StreamConfig
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 moreSource§impl Debug for StreamConfig
impl Debug for StreamConfig
Auto Trait Implementations§
impl Freeze for StreamConfig
impl RefUnwindSafe for StreamConfig
impl Send for StreamConfig
impl Sync for StreamConfig
impl Unpin for StreamConfig
impl UnwindSafe for StreamConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more