pub enum LoreError {
Db(Error),
Io(Error),
Lock(String),
WatcherError(String),
InvalidSlug(String),
PageNotFound(String),
PlaceholderPage(String),
VaultNotSet,
UnsafePath(String),
}Expand description
Engine error type. All public engine functions return Result<T, LoreError>.
Variants§
Db(Error)
SQLite error (query failure, constraint violation, etc.).
Io(Error)
Filesystem I/O error (read, write, rename, delete).
Lock(String)
A Mutex was poisoned (another thread panicked while holding it).
WatcherError(String)
File watcher failed to start or encountered a runtime error.
InvalidSlug(String)
A page title produced an empty or invalid slug.
PageNotFound(String)
No page exists with the requested slug.
PlaceholderPage(String)
Attempted to save content to a placeholder page (no backing file).
VaultNotSet
No vault is currently open.
UnsafePath(String)
A folder path contains unsafe components (e.g. .. or absolute paths).
Trait Implementations§
Source§impl Error for LoreError
impl Error for LoreError
1.30.0 · 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<T> From<PoisonError<T>> for LoreError
impl<T> From<PoisonError<T>> for LoreError
Source§fn from(e: PoisonError<T>) -> Self
fn from(e: PoisonError<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LoreError
impl !RefUnwindSafe for LoreError
impl Send for LoreError
impl Sync for LoreError
impl Unpin for LoreError
impl UnsafeUnpin for LoreError
impl !UnwindSafe for LoreError
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