pub struct Config { /* private fields */ }
Expand description
Configuration for how JSON values should be compared.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(compare_mode: CompareMode) -> Self
pub fn new(compare_mode: CompareMode) -> Self
Create a new Config
using the given CompareMode
.
The default numeric_mode
is be NumericMode::Strict
.
Sourcepub fn numeric_mode(self, numeric_mode: NumericMode) -> Self
pub fn numeric_mode(self, numeric_mode: NumericMode) -> Self
Change the config’s numeric mode.
The default numeric_mode
is be NumericMode::Strict
.
Sourcepub fn compare_mode(self, compare_mode: CompareMode) -> Self
pub fn compare_mode(self, compare_mode: CompareMode) -> Self
Change the config’s compare mode.
Sourcepub fn float_compare_mode(self, float_compare_mode: FloatCompareMode) -> Self
pub fn float_compare_mode(self, float_compare_mode: FloatCompareMode) -> Self
Change the config’s float compare mode.
The default float_compare_mode
is FloatCompareMode::Exact
.
Sourcepub fn consider_array_sorting(self, consider: bool) -> Self
pub fn consider_array_sorting(self, consider: bool) -> Self
configure array sorting mode
Trait Implementations§
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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