Struct stellar_xdr::next::Limits
source · pub struct Limits {
pub depth: u32,
pub len: usize,
}Available on crate features
next and std only.Expand description
Limits contains the limits that a limited reader or writer will be
constrained to.
Fields§
§depth: u32Defines 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: usizeDefines 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 PartialEq for Limits
impl PartialEq for Limits
source§impl PartialOrd for Limits
impl PartialOrd for Limits
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Limits
impl StructuralEq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
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