pub struct LimitsManager { /* private fields */ }Implementations§
Source§impl LimitsManager
impl LimitsManager
pub fn new(config: LimitsConfig) -> Self
pub fn with_defaults() -> Self
pub fn set_server_maximum_packet_size(&mut self, size: u32)
pub fn set_client_maximum_packet_size(&mut self, size: u32)
pub fn effective_maximum_packet_size(&self) -> u32
Sourcepub fn check_packet_size(&self, size: usize) -> Result<()>
pub fn check_packet_size(&self, size: usize) -> Result<()>
§Errors
Returns PacketTooLarge if the size exceeds the effective maximum.
pub fn calculate_message_expiry( &self, expiry_interval: Option<u32>, ) -> Option<Instant>
pub fn is_message_expired(&self, expiry_time: Option<Instant>) -> bool
pub fn get_remaining_expiry(&self, expiry_time: Option<Instant>) -> Option<u32>
pub fn client_maximum_packet_size(&self) -> u32
pub fn server_maximum_packet_size(&self) -> Option<u32>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LimitsManager
impl RefUnwindSafe for LimitsManager
impl Send for LimitsManager
impl Sync for LimitsManager
impl Unpin for LimitsManager
impl UnwindSafe for LimitsManager
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