Enum validatron::error::Location[][src]

pub enum Location {
    Named(Cow<'static, str>),
    Index(usize),
}

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

impl Debug for Location[src]

impl Eq for Location[src]

impl Hash for Location[src]

impl PartialEq<Location> for Location[src]

impl Serialize for Location[src]

impl StructuralEq for Location[src]

impl StructuralPartialEq for Location[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.