pub enum PathError {
MissingEquals,
EmptyPath,
EmptySegment {
path: String,
},
BadIndex {
path: String,
},
IndexInKeyPath {
path: String,
},
}Expand description
Why a path expression was rejected.
Carries the path text and nothing else — no --set, no --interpolate,
no filenames. Provenance is the caller’s job.
IndexInKeyPath is raised by
RefPath::try_into_keys alone, never by parsing.
MissingEquals has no producer in this module
— a bare RefPath has no = to miss. It belongs to
PathLeaf, which parses key.path=value over this grammar and shares this
error rather than wrapping it, so one spelling of a bad path reads the same
wherever it was typed.
Variants§
MissingEquals
No = in a key.path=value expression.
EmptyPath
The path is empty (=1, an empty ${...} body, an empty vec).
EmptySegment
A path segment is empty (a..b, .a, a.).
BadIndex
A bracket step is malformed: empty, not a number, too big, or unclosed.
IndexInKeyPath
A path that arrived at a writer contained an array index.
Raised by RefPath::try_into_keys only, never by parsing: writers
take keys one per segment because arrays replace wholesale on the
merge side, so there is no meaning to writing element n.
Trait Implementations§
impl Eq for PathError
Source§impl Error for PathError
impl Error for PathError
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()
impl StructuralPartialEq for PathError
Auto Trait Implementations§
impl Freeze for PathError
impl RefUnwindSafe for PathError
impl Send for PathError
impl Sync for PathError
impl Unpin for PathError
impl UnsafeUnpin for PathError
impl UnwindSafe for PathError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.