pub enum CategoryError {
InvalidName(String),
AlreadyExists(String),
NotFound(String),
Persistence(Error),
Serialise(Error),
}Expand description
Errors from category registry operations.
Variants§
InvalidName(String)
The provided name failed validation (empty, too long, illegal characters, leading slash, path traversal, or whitespace-only).
AlreadyExists(String)
A category with that name already exists (returned by
CategoryRegistry::create).
NotFound(String)
The requested category does not exist (returned by
CategoryRegistry::edit).
Persistence(Error)
I/O failure writing the registry file.
Serialise(Error)
TOML serialise failure.
Trait Implementations§
Source§impl Debug for CategoryError
impl Debug for CategoryError
Source§impl Display for CategoryError
impl Display for CategoryError
Source§impl Error for CategoryError
impl Error for CategoryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
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
Converts to this type from the input type.
Source§impl From<Error> for CategoryError
impl From<Error> for CategoryError
Auto Trait Implementations§
impl Freeze for CategoryError
impl !RefUnwindSafe for CategoryError
impl Send for CategoryError
impl Sync for CategoryError
impl Unpin for CategoryError
impl UnsafeUnpin for CategoryError
impl !UnwindSafe for CategoryError
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> 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.