pub enum Location {
Named(Cow<'static, str>),
Index(usize),
}
Expand description
The location within a data structure in which a validation error could occur. Similar to serde we only support json style data structures with either numerically indexed or keyed locations.
Variants§
Named(Cow<'static, str>)
A keyed location, this could be a struct field or a map key
Index(usize)
An indexed location, this could be a tuple or a vector index
Trait Implementations§
Source§impl Ord for Location
impl Ord for Location
Source§impl PartialOrd for Location
impl PartialOrd for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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