pub enum ExpandSavePathError {
UnknownToken {
token: String,
},
UnterminatedToken {
offset: usize,
},
EmptyToken {
offset: usize,
},
CategoryNotFound {
name: String,
},
Category(CategoryError),
}Expand description
Errors from save-path expansion.
Variants§
UnknownToken
The template referenced a token outside the locked five-token
grammar. The offending token name (without the {}) is returned
verbatim so callers can surface it in error UI.
UnterminatedToken
A { was opened but never closed. Returned with the byte offset
of the unclosed brace inside the template’s string representation.
EmptyToken
{} (empty braces) — the template has a brace pair with no token
name between them. Treated as a separate failure mode from
UnknownToken so callers can render a more specific message.
CategoryNotFound
The template referred to a category name that is not present in
the supplied CategoryRegistry.
Category(CategoryError)
Underlying CategoryError surfaced for completeness — the
expander itself never produces these, but
expand_save_path_for_category forwards them when a registry
operation fails.
Trait Implementations§
Source§impl Debug for ExpandSavePathError
impl Debug for ExpandSavePathError
Source§impl Display for ExpandSavePathError
impl Display for ExpandSavePathError
Source§impl Error for ExpandSavePathError
impl Error for ExpandSavePathError
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 From<CategoryError> for ExpandSavePathError
impl From<CategoryError> for ExpandSavePathError
Source§fn from(source: CategoryError) -> Self
fn from(source: CategoryError) -> Self
Auto Trait Implementations§
impl Freeze for ExpandSavePathError
impl !RefUnwindSafe for ExpandSavePathError
impl Send for ExpandSavePathError
impl Sync for ExpandSavePathError
impl Unpin for ExpandSavePathError
impl UnsafeUnpin for ExpandSavePathError
impl !UnwindSafe for ExpandSavePathError
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> 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>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.