pub struct StructuralLimits {
pub max_depth: usize,
pub max_fields: usize,
pub max_string_len: usize,
pub max_array_items: usize,
}Expand description
Configurable structural limits checked against LnmpRecord/LnmpValue.
Fields§
§max_depth: usizeMaximum allowed nesting depth (root = 0).
max_fields: usizeMaximum total number of fields across the entire record (including nested).
max_string_len: usizeMaximum string length (bytes) for String values.
max_array_items: usizeMaximum item count for arrays (string or nested record arrays).
Implementations§
Source§impl StructuralLimits
impl StructuralLimits
Sourcepub fn validate_record(
&self,
record: &LnmpRecord,
) -> Result<(), StructuralError>
pub fn validate_record( &self, record: &LnmpRecord, ) -> Result<(), StructuralError>
Validates a record against the configured limits.
Trait Implementations§
Source§impl Clone for StructuralLimits
impl Clone for StructuralLimits
Source§fn clone(&self) -> StructuralLimits
fn clone(&self) -> StructuralLimits
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 StructuralLimits
impl Debug for StructuralLimits
Auto Trait Implementations§
impl Freeze for StructuralLimits
impl RefUnwindSafe for StructuralLimits
impl Send for StructuralLimits
impl Sync for StructuralLimits
impl Unpin for StructuralLimits
impl UnwindSafe for StructuralLimits
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