pub struct CompareOptions {
pub ignore_key_order: bool,
pub compare_tags: bool,
pub schema: Schema,
pub float_tolerance: Option<f64>,
pub max_differences: usize,
}Expand description
How strict a comparison to make.
Fields§
§ignore_key_order: boolTreat mappings as unordered. YAML assigns no meaning to key order, and two writers routinely disagree about it, so this is on by default.
Require nodes to carry the same tag. On by default: in ASDF the tag is the type, so ignoring it would let an ndarray compare equal to a plain mapping.
schema: SchemaWhich scalar-resolution rules to apply to both sides.
float_tolerance: Option<f64>Relative tolerance for comparing floats. None requires bit-equal
values (with NaN equal to NaN, which == would not give).
max_differences: usizeStop after this many differences, so a wholly unrelated pair of documents does not produce an unreadable report.
Trait Implementations§
Source§impl Clone for CompareOptions
impl Clone for CompareOptions
Source§fn clone(&self) -> CompareOptions
fn clone(&self) -> CompareOptions
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 moreimpl Copy for CompareOptions
Source§impl Debug for CompareOptions
impl Debug for CompareOptions
Auto Trait Implementations§
impl Freeze for CompareOptions
impl RefUnwindSafe for CompareOptions
impl Send for CompareOptions
impl Sync for CompareOptions
impl Unpin for CompareOptions
impl UnsafeUnpin for CompareOptions
impl UnwindSafe for CompareOptions
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