pub struct ParseBudgets {
pub max_bytes: usize,
pub max_nesting_depth: usize,
pub max_tokens: usize,
pub max_statements: usize,
pub max_literal_bytes: usize,
}Expand description
Resource budgets enforced by full and lightweight parse entry points.
Default::default enables conservative hard limits intended to protect
parser callers from hostile or unexpectedly large input. Use
Self::unlimited only for trusted local workloads such as benchmarks.
Fields§
§max_bytes: usize§max_nesting_depth: usize§max_tokens: usize§max_statements: usize§max_literal_bytes: usizeImplementations§
Source§impl ParseBudgets
impl ParseBudgets
Trait Implementations§
Source§impl Clone for ParseBudgets
impl Clone for ParseBudgets
Source§fn clone(&self) -> ParseBudgets
fn clone(&self) -> ParseBudgets
Returns a duplicate of the value. Read more
1.0.0 · 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 ParseBudgets
impl Debug for ParseBudgets
Source§impl Default for ParseBudgets
impl Default for ParseBudgets
Source§impl PartialEq for ParseBudgets
impl PartialEq for ParseBudgets
impl Copy for ParseBudgets
impl Eq for ParseBudgets
impl StructuralPartialEq for ParseBudgets
Auto Trait Implementations§
impl Freeze for ParseBudgets
impl RefUnwindSafe for ParseBudgets
impl Send for ParseBudgets
impl Sync for ParseBudgets
impl Unpin for ParseBudgets
impl UnsafeUnpin for ParseBudgets
impl UnwindSafe for ParseBudgets
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