pub struct Limits {
pub depth: u32,
pub len: usize,
}
Available on crate features
curr
and std
only.Expand description
Limits
contains the limits that a limited reader or writer will be
constrained to.
Fields§
§depth: u32
Defines the maximum depth for recursive calls in Read/WriteXdr
to
prevent stack overflow.
The depth limit is akin to limiting stack depth. Its purpose is to
prevent the program from hitting the maximum stack size allowed by Rust,
which would result in an unrecoverable SIGABRT
. For more information
about Rust’s stack size limit, refer to the Rust
documentation.
len: usize
Defines the maximum number of bytes that will be read or written.
Implementations§
Trait Implementations§
Source§impl Ord for Limits
impl Ord for Limits
Source§impl PartialOrd for Limits
impl PartialOrd for Limits
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
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