Trait Similar

Source
pub trait Similar<Rhs: ?Sized = Self> {
    // Required method
    fn similar(&self, other: &Rhs) -> Option<Value>;
}
Expand description

Helper trait to identify when two JsonShapes are similar but not equal, meaning they only diverge in being optional.

Required Methods§

Source

fn similar(&self, other: &Rhs) -> Option<Value>

Tests for self and other values to be similar (equal ignoring the optional), returning the optional version

Implementors§