pub struct ClientLimits {
pub max_frame_size: u32,
pub max_in_flight: usize,
pub queued_writes: usize,
pub queued_responses: usize,
pub buffered_bytes: u32,
pub incomplete_frame_timeout: Option<Duration>,
pub request_timeout: Option<Duration>,
}Expand description
Hard resource bounds for one framed connection.
Fields§
§max_frame_size: u32Maximum length after the four-byte prefix, including ID and flags.
max_in_flight: usizeActive and draining IDs both consume this capacity.
queued_writes: usizeWriter item capacity, in addition to the shared byte budget.
queued_responses: usizePer-subscription response capacity, in addition to the byte budget.
buffered_bytes: u32Combined queued/in-progress read and write bytes.
incomplete_frame_timeout: Option<Duration>Completion deadline once the first frame byte arrives; idle is separate.
request_timeout: Option<Duration>Default local request wait; no remote cancellation is implied.
Implementations§
Source§impl ClientLimits
impl ClientLimits
Sourcepub fn validate(&self) -> ClientResult<()>
pub fn validate(&self) -> ClientResult<()>
Reject limits that cannot buffer even one maximum-sized frame.
Trait Implementations§
Source§impl Clone for ClientLimits
impl Clone for ClientLimits
Source§fn clone(&self) -> ClientLimits
fn clone(&self) -> ClientLimits
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 ClientLimits
impl Debug for ClientLimits
Auto Trait Implementations§
impl Freeze for ClientLimits
impl RefUnwindSafe for ClientLimits
impl Send for ClientLimits
impl Sync for ClientLimits
impl Unpin for ClientLimits
impl UnsafeUnpin for ClientLimits
impl UnwindSafe for ClientLimits
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