pub struct SchemaInferenceConfig {Show 17 fields
pub ignore_outer_array: bool,
pub delimiter: Option<u8>,
pub schema_uri: Option<String>,
pub map_threshold: usize,
pub map_max_required_keys: Option<usize>,
pub unify_maps: bool,
pub no_unify: HashSet<String>,
pub force_field_types: HashMap<String, String>,
pub force_parent_field_types: HashMap<String, String>,
pub force_scalar_promotion: HashSet<String>,
pub wrap_scalars: bool,
pub wrap_root: Option<String>,
pub no_root_map: bool,
pub max_builders: Option<usize>,
pub debug: bool,
pub profile: bool,
pub verbosity: DebugVerbosity,
}Fields§
§ignore_outer_array: boolWhether to treat top-level arrays as streams of objects
delimiter: Option<u8>Delimiter for NDJSON format (None for regular JSON)
schema_uri: Option<String>Schema URI to use (“AUTO” for auto-detection)
map_threshold: usizeThreshold above which non-fixed keys are treated as a map
map_max_required_keys: Option<usize>Maximum number of required keys a Map can have. If None, no gating based on required keys. If Some(n), objects with more than n required keys will be forced to Record type.
unify_maps: boolEnable unification of compatible but non-homogeneous record schemas into maps
no_unify: HashSet<String>Fields whose keys should not be merged during record unification
force_field_types: HashMap<String, String>Force override of field treatment, e.g. {“labels”: “map”}
force_parent_field_types: HashMap<String, String>Force parent objects containing these fields to remain as records, preventing map inference. e.g. {“mainsnak”: “record”} prevents any object containing a “mainsnak” field from being converted to a map, ensuring homogeneity across array items.
force_scalar_promotion: HashSet<String>Set of field names that should always be promoted to wrapped scalars, even when they appear as simple scalars (not in type unions). This ensures schema stability for fields known to have heterogeneous types across schematised files.
wrap_scalars: boolWhether to promote scalar values to wrapped objects when they collide with record values
during unification. If true, scalars are promoted under a synthetic property name derived from
the parent field and the scalar type (e.g. “foo__string”). If false, don’t unify on conflicts.
wrap_root: Option<String>Wrap the inferred top-level schema under a single required field with this name.
Example: wrap_root = Some(“labels”) turns {...} into
{"type":"object","properties":{"labels":{...}},"required":["labels"]}.
no_root_map: boolPrevent the document root from becoming a map type, even if it meets map inference criteria
max_builders: Option<usize>Maximum number of schema builders to create in parallel at once Lower values reduce peak memory usage during schema inference None: process all strings at once
debug: boolEnable debug output. When true, prints detailed information about schema inference
processes including field unification, map detection, and scalar wrapping decisions.
profile: boolEnable profiling output. When true, prints detailed information about timing.
verbosity: DebugVerbosityControls the verbosity level of debug output
Trait Implementations§
Source§impl Clone for SchemaInferenceConfig
impl Clone for SchemaInferenceConfig
Source§fn clone(&self) -> SchemaInferenceConfig
fn clone(&self) -> SchemaInferenceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchemaInferenceConfig
impl Debug for SchemaInferenceConfig
Source§impl Default for SchemaInferenceConfig
impl Default for SchemaInferenceConfig
Source§impl<'de> Deserialize<'de> for SchemaInferenceConfig
impl<'de> Deserialize<'de> for SchemaInferenceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SchemaInferenceConfig
impl RefUnwindSafe for SchemaInferenceConfig
impl Send for SchemaInferenceConfig
impl Sync for SchemaInferenceConfig
impl Unpin for SchemaInferenceConfig
impl UnwindSafe for SchemaInferenceConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more