Struct DecodeLimits
pub struct DecodeLimits {
pub max_links: u64,
pub max_references: u64,
pub max_nodes: usize,
pub max_string_bytes: usize,
pub max_depth: usize,
}Expand description
Safety limits applied while decoding untrusted input.
Fields§
§max_links: u64Maximum number of links in a packet.
max_references: u64Maximum number of references in all links of a packet.
max_nodes: usizeMaximum number of LiNo nodes a packet may expand to.
max_string_bytes: usizeMaximum total UTF-8 bytes in expanded references, including link ids.
max_depth: usizeMaximum LiNo nesting depth.
Implementations§
§impl DecodeLimits
impl DecodeLimits
pub fn unlimited() -> DecodeLimits
pub fn unlimited() -> DecodeLimits
Limits for trusted input such as a store archive: only the address space bounds the packet.
Trait Implementations§
§impl Clone for DecodeLimits
impl Clone for DecodeLimits
§fn clone(&self) -> DecodeLimits
fn clone(&self) -> DecodeLimits
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 moreimpl Copy for DecodeLimits
§impl Debug for DecodeLimits
impl Debug for DecodeLimits
§impl Default for DecodeLimits
impl Default for DecodeLimits
§fn default() -> DecodeLimits
fn default() -> DecodeLimits
Returns the “default value” for a type. Read more
impl Eq for DecodeLimits
§impl PartialEq for DecodeLimits
impl PartialEq for DecodeLimits
impl StructuralPartialEq for DecodeLimits
Auto Trait Implementations§
impl Freeze for DecodeLimits
impl RefUnwindSafe for DecodeLimits
impl Send for DecodeLimits
impl Sync for DecodeLimits
impl Unpin for DecodeLimits
impl UnsafeUnpin for DecodeLimits
impl UnwindSafe for DecodeLimits
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