pub struct CompiledSchema {
pub include_patterns: Vec<SchemaPattern>,
pub exclude_patterns: Vec<SchemaPattern>,
pub max_depth: usize,
pub pattern_hashes: Vec<u64>,
}Expand description
Compiled schema for SIMD-accelerated filtering
Fields§
§include_patterns: Vec<SchemaPattern>Include patterns (paths that should be kept)
exclude_patterns: Vec<SchemaPattern>Exclude patterns (paths that should be skipped)
max_depth: usizeMaximum parsing depth
pattern_hashes: Vec<u64>Hash table for fast lookups
Implementations§
Source§impl CompiledSchema
impl CompiledSchema
Sourcepub fn compile_with_excludes(
include_paths: &[String],
exclude_paths: &[String],
) -> Result<Self>
pub fn compile_with_excludes( include_paths: &[String], exclude_paths: &[String], ) -> Result<Self>
Compile a schema with both include and exclude patterns
§Errors
Returns an error if any path pattern is invalid
Sourcepub fn field_paths(&self) -> Vec<String>
pub fn field_paths(&self) -> Vec<String>
Get the field paths that this schema includes
Sourcepub fn matches_path(&self, path: &str) -> bool
pub fn matches_path(&self, path: &str) -> bool
Check if a path matches the schema (includes but not excludes)
Sourcepub fn is_excluded(&self, path: &str) -> bool
pub fn is_excluded(&self, path: &str) -> bool
Check if a path is explicitly excluded
Sourcepub fn should_include_object(&self, path: &str) -> bool
pub fn should_include_object(&self, path: &str) -> bool
Check if we should include an object at the given path
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompiledSchema
impl RefUnwindSafe for CompiledSchema
impl Send for CompiledSchema
impl Sync for CompiledSchema
impl Unpin for CompiledSchema
impl UnwindSafe for CompiledSchema
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