#[non_exhaustive]pub enum ValidationLevel {
SectionTable,
Layout,
}Expand description
Validation depth applied at snapshot open time.
Validation responsibilities are layered. Header-only validation is not a
member of this enum; callers wanting it should use
HeaderOnlySnapshot::open instead, so the type system distinguishes a
section-bearing handle from one whose section table has not been
validated.
SectionTableparses the section table and per-entry self-consistency (alignment bound, reserved bytes zero, flags zero).Layoutis the default; it adds payload bounds, monotonic-offset enforcement, and duplicate-kind detection.
Topology-level validation (CSR offset monotonicity, hypergraph role consistency, etc.) is the consumer’s responsibility — the container has no kind registry and cannot validate semantics it does not know.
§Performance
perf: unspecified; this is a metadata enum.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SectionTable
Validate header and section table self-consistency.
Layout
Validate header, section table, and full payload layout.
Trait Implementations§
Source§impl Clone for ValidationLevel
impl Clone for ValidationLevel
Source§fn clone(&self) -> ValidationLevel
fn clone(&self) -> ValidationLevel
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 ValidationLevel
Source§impl Debug for ValidationLevel
impl Debug for ValidationLevel
impl Eq for ValidationLevel
Source§impl PartialEq for ValidationLevel
impl PartialEq for ValidationLevel
Source§fn eq(&self, other: &ValidationLevel) -> bool
fn eq(&self, other: &ValidationLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ValidationLevel
Auto Trait Implementations§
impl Freeze for ValidationLevel
impl RefUnwindSafe for ValidationLevel
impl Send for ValidationLevel
impl Sync for ValidationLevel
impl Unpin for ValidationLevel
impl UnsafeUnpin for ValidationLevel
impl UnwindSafe for ValidationLevel
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