SchemaInferenceConfig

Struct SchemaInferenceConfig 

Source
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: bool

Whether 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: usize

Threshold 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: bool

Enable 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: bool

Whether 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: bool

Prevent 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: bool

Enable debug output. When true, prints detailed information about schema inference processes including field unification, map detection, and scalar wrapping decisions.

§profile: bool

Enable profiling output. When true, prints detailed information about timing.

§verbosity: DebugVerbosity

Controls the verbosity level of debug output

Trait Implementations§

Source§

impl Clone for SchemaInferenceConfig

Source§

fn clone(&self) -> SchemaInferenceConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SchemaInferenceConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SchemaInferenceConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SchemaInferenceConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for SchemaInferenceConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,