pub struct EmbeddedLimits {
pub max_depth: usize,
pub max_token_length: usize,
pub max_container_items: usize,
}Expand description
Runtime and compile-time limits to protect against stack overflows and excessive resource consumption.
Fields§
§max_depth: usizeMaximum recursive nesting depth (default: 16).
max_token_length: usizeMaximum token or string length in bytes (default: 256).
max_container_items: usizeMaximum container elements (default: 64).
Implementations§
Source§impl EmbeddedLimits
impl EmbeddedLimits
Sourcepub const CONSERVATIVE: EmbeddedLimits
pub const CONSERVATIVE: EmbeddedLimits
Standard conservative limits for 32-bit microcontrollers (e.g. ARM Cortex-M).
Sourcepub const MINIMAL: EmbeddedLimits
pub const MINIMAL: EmbeddedLimits
Minimal limits for ultra-constrained systems (e.g. 8-bit AVR or Cortex-M0 with <= 4KB RAM).
Trait Implementations§
Source§impl Clone for EmbeddedLimits
impl Clone for EmbeddedLimits
Source§fn clone(&self) -> EmbeddedLimits
fn clone(&self) -> EmbeddedLimits
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 EmbeddedLimits
Source§impl Debug for EmbeddedLimits
impl Debug for EmbeddedLimits
Source§impl Default for EmbeddedLimits
impl Default for EmbeddedLimits
Source§fn default() -> EmbeddedLimits
fn default() -> EmbeddedLimits
Returns the “default value” for a type. Read more
impl Eq for EmbeddedLimits
Source§impl PartialEq for EmbeddedLimits
impl PartialEq for EmbeddedLimits
impl StructuralPartialEq for EmbeddedLimits
Auto Trait Implementations§
impl Freeze for EmbeddedLimits
impl RefUnwindSafe for EmbeddedLimits
impl Send for EmbeddedLimits
impl Sync for EmbeddedLimits
impl Unpin for EmbeddedLimits
impl UnsafeUnpin for EmbeddedLimits
impl UnwindSafe for EmbeddedLimits
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