pub struct ConnectionLimits { /* private fields */ }Expand description
Bounded resources owned by one connection epoch.
Implementations§
Source§impl ConnectionLimits
impl ConnectionLimits
Sourcepub const fn new(
max_operations: usize,
max_retained_bytes: RetainedBytes,
max_write_frames: usize,
max_write_retained_bytes: RetainedBytes,
match_keys: MatchKeySpace,
) -> Result<Self, LimitsError>
pub const fn new( max_operations: usize, max_retained_bytes: RetainedBytes, max_write_frames: usize, max_write_retained_bytes: RetainedBytes, match_keys: MatchKeySpace, ) -> Result<Self, LimitsError>
Creates limits with nonzero count capacities.
Sourcepub const fn max_operations(self) -> usize
pub const fn max_operations(self) -> usize
Returns the maximum accepted and reserved operations.
Sourcepub const fn max_retained_bytes(self) -> RetainedBytes
pub const fn max_retained_bytes(self) -> RetainedBytes
Returns the maximum semantic retained bytes.
Sourcepub const fn max_write_frames(self) -> usize
pub const fn max_write_frames(self) -> usize
Returns the maximum queued and reserved write frames.
Sourcepub const fn max_write_retained_bytes(self) -> RetainedBytes
pub const fn max_write_retained_bytes(self) -> RetainedBytes
Returns the maximum memory retained by queued and reserved frames.
Sourcepub const fn match_keys(self) -> MatchKeySpace
pub const fn match_keys(self) -> MatchKeySpace
Returns the match-key space.
Trait Implementations§
Source§impl Clone for ConnectionLimits
impl Clone for ConnectionLimits
impl Copy for ConnectionLimits
Source§impl Debug for ConnectionLimits
impl Debug for ConnectionLimits
impl Eq for ConnectionLimits
Source§impl PartialEq for ConnectionLimits
impl PartialEq for ConnectionLimits
impl StructuralPartialEq for ConnectionLimits
Auto Trait Implementations§
impl Freeze for ConnectionLimits
impl RefUnwindSafe for ConnectionLimits
impl Send for ConnectionLimits
impl Sync for ConnectionLimits
impl Unpin for ConnectionLimits
impl UnsafeUnpin for ConnectionLimits
impl UnwindSafe for ConnectionLimits
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