pub struct NumericCoercionConfig {
pub empty_string_to_zero: bool,
pub null_to_zero: bool,
pub bool_to_number: bool,
pub strict_numeric: bool,
pub undefined_to_zero: bool,
}Expand description
Configuration for numeric coercion behavior
Fields§
§empty_string_to_zero: boolConvert empty strings to 0 (default: true)
null_to_zero: boolConvert null to 0 (default: true)
bool_to_number: boolConvert booleans to numbers (true=1, false=0) (default: true)
strict_numeric: boolOnly allow strict numeric parsing (no coercion) (default: false)
undefined_to_zero: boolConvert undefined/missing values to 0 (default: false)
Trait Implementations§
Source§impl Clone for NumericCoercionConfig
impl Clone for NumericCoercionConfig
Source§fn clone(&self) -> NumericCoercionConfig
fn clone(&self) -> NumericCoercionConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 NumericCoercionConfig
impl Debug for NumericCoercionConfig
Auto Trait Implementations§
impl Freeze for NumericCoercionConfig
impl RefUnwindSafe for NumericCoercionConfig
impl Send for NumericCoercionConfig
impl Sync for NumericCoercionConfig
impl Unpin for NumericCoercionConfig
impl UnwindSafe for NumericCoercionConfig
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