pub enum PathError {
UndefinedRoot(String),
Absence(String),
Shape(String),
}Expand description
Why a variable path failed to resolve.
The three-way split is load-bearing for ${path:-default} (decision A): the
default fires on absence but never on a shape error — a wrong-typed
access is a bug, not a missing value. All three are loud for a bare access;
they diverge only when :- is present (see the default handling), where
UndefinedRoot/Absence yield the default and Shape still shouts.
UndefinedRoot— the root variable (or an unset dynamic$ksubscript) is not in scope. Soft in string interpolation (expands to empty, matching bash), loud in expression position.Absence— the path is well-shaped but the target isn’t there: a missing record key or an out-of-bounds list index.Shape— the access is wrong for the value: a string key on a list, an integer index on a record, subscripting a scalar, a dotted (non-bracket) segment, or slicing a record. Never suppressed by:-.
A loud error is surfaced everywhere, including inside strings; it is NEVER silently swallowed to an empty expansion.
Variants§
UndefinedRoot(String)
The root variable is not in scope (or an unset dynamic $k subscript).
Absence(String)
A missing key or out-of-bounds index — absence, not misuse.
Shape(String)
A wrong-for-the-shape access. Message ready to display.
Trait Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.