pub enum RouteError {
IndexCount {
route: String,
wanted: usize,
given: usize,
},
NoSuchField {
route: String,
label: String,
at: String,
},
NotAList {
route: String,
at: String,
},
NotAStruct {
route: String,
at: String,
},
NamesNoField {
route: String,
},
AmbiguousArm {
count: usize,
route: String,
label: String,
at: String,
},
}Expand description
Why a route could not be used.
Variants§
IndexCount
The route wants a different number of indices than it was given.
Fields
NoSuchField
The schema has no such field at that point in the route.
Fields
NotAList
The route indexes something that is not a list.
NotAStruct
The route descends into something with no fields under it.
NamesNoField
The route ends without naming a field.
An empty route, or one ending at a list element rather than at something the element holds.
AmbiguousArm
The label is declared more than once at that point, so no single entry describes it.
Not a defect on its own. Both arms of a split may declare a label with
different write rules, and which applies depends on the selector’s
value in one file. The address is the same either way, so a caller that
wants the location rather than the entry uses
FieldRoute::entries_in and gets both.
Trait Implementations§
Source§impl Clone for RouteError
impl Clone for RouteError
Source§fn clone(&self) -> RouteError
fn clone(&self) -> RouteError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RouteError
impl Debug for RouteError
Source§impl Display for RouteError
impl Display for RouteError
Source§impl Error for RouteError
impl Error for RouteError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for RouteError
impl PartialEq for RouteError
Source§fn eq(&self, other: &RouteError) -> bool
fn eq(&self, other: &RouteError) -> bool
self and other values to be equal, and is used by ==.