pub struct ParseConfig {
pub max_incoming_binary_buf_size: usize,
pub max_incoming_binaries: usize,
pub packet_completion_timeout: Duration,
}Expand description
A config passed to the parsers in order to securely decode packets
Fields§
§max_incoming_binary_buf_size: usizeMaximum buffer size of all the incoming binary attachments.
If the sum of each attachment exceeds this limit, the packet will be dropped and the connection closed.
Default to 10 MB
max_incoming_binaries: usizeMaximum number of incoming binary attachments.
If the incoming_binary_cnt is exceeded,
the packet will be dropped and the connection closed.
Default to 10_000
packet_completion_timeout: DurationTimeout after which it is no longer tolerable to wait for partial binary packets, the entire packet will dropped and the connection closed.
Default to 60 seconds
Trait Implementations§
Source§impl Clone for ParseConfig
impl Clone for ParseConfig
Source§fn clone(&self) -> ParseConfig
fn clone(&self) -> ParseConfig
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 ParseConfig
impl Debug for ParseConfig
Auto Trait Implementations§
impl Freeze for ParseConfig
impl RefUnwindSafe for ParseConfig
impl Send for ParseConfig
impl Sync for ParseConfig
impl Unpin for ParseConfig
impl UnsafeUnpin for ParseConfig
impl UnwindSafe for ParseConfig
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