#[non_exhaustive]pub struct TypeConversionConfig {
pub dates: DateConversionConfig,
pub nulls: NullConversionConfig,
pub booleans: BooleanConversionConfig,
pub numbers: NumberConversionConfig,
}Expand description
Bundles all four type-conversion categories (dates, nulls, booleans, numbers).
Assembled by crate::JSONTools’s convert_*/convert_*_config/
auto_convert_types builder methods and consumed by the processing engine.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dates: DateConversionConfigDate/datetime conversion settings
nulls: NullConversionConfigNull-string conversion settings
booleans: BooleanConversionConfigBoolean-string conversion settings
numbers: NumberConversionConfigNumeric-string conversion settings
Implementations§
Source§impl TypeConversionConfig
impl TypeConversionConfig
Sourcepub fn dates(self, config: DateConversionConfig) -> Self
pub fn dates(self, config: DateConversionConfig) -> Self
Configure date/datetime conversion
Sourcepub fn nulls(self, config: NullConversionConfig) -> Self
pub fn nulls(self, config: NullConversionConfig) -> Self
Configure null-string conversion
Sourcepub fn booleans(self, config: BooleanConversionConfig) -> Self
pub fn booleans(self, config: BooleanConversionConfig) -> Self
Configure boolean-string conversion
Sourcepub fn numbers(self, config: NumberConversionConfig) -> Self
pub fn numbers(self, config: NumberConversionConfig) -> Self
Configure numeric-string conversion
Sourcepub fn has_any_enabled(&self) -> bool
pub fn has_any_enabled(&self) -> bool
Check if any type-conversion category is enabled
Trait Implementations§
Source§impl Clone for TypeConversionConfig
impl Clone for TypeConversionConfig
Source§fn clone(&self) -> TypeConversionConfig
fn clone(&self) -> TypeConversionConfig
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 moreSource§impl Debug for TypeConversionConfig
impl Debug for TypeConversionConfig
Source§impl Default for TypeConversionConfig
impl Default for TypeConversionConfig
Source§fn default() -> TypeConversionConfig
fn default() -> TypeConversionConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TypeConversionConfig
impl RefUnwindSafe for TypeConversionConfig
impl Send for TypeConversionConfig
impl Sync for TypeConversionConfig
impl Unpin for TypeConversionConfig
impl UnsafeUnpin for TypeConversionConfig
impl UnwindSafe for TypeConversionConfig
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
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>
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 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>
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