#[non_exhaustive]pub enum SessionError {
Io {
path: PathBuf,
source: Error,
},
Json {
path: PathBuf,
line: usize,
source: Error,
},
InvalidSessionId(String),
UnknownEntry(EntryId),
AmbiguousId(Vec<PathBuf>),
UnsupportedVersion(u32),
MissingHeader(PathBuf),
MissingCwd(PathBuf),
InvalidAppend(&'static str),
NotFound(PathBuf),
Cancelled,
}Expand description
Errors raised by parsing, migration and crate::SessionManager operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io
File-system failure.
Json
A line could not be (de)serialised.
Fields
InvalidSessionId(String)
Session id failed validation (message text is fixed, verbatim).
UnknownEntry(EntryId)
Entry id not present.
AmbiguousId(Vec<PathBuf>)
Session id prefix matched several files.
UnsupportedVersion(u32)
File written by a newer session format.
MissingHeader(PathBuf)
The file has content but no valid header line.
MissingCwd(PathBuf)
The header has no cwd and no override was supplied.
InvalidAppend(&'static str)
The append is not allowed (reason given).
NotFound(PathBuf)
Required file does not exist.
Cancelled
Listing was cancelled through the cancel flag.
Trait Implementations§
Source§impl Debug for SessionError
impl Debug for SessionError
Source§impl Display for SessionError
impl Display for SessionError
Source§impl Error for SessionError
impl Error for SessionError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SessionError
impl !UnwindSafe for SessionError
impl Freeze for SessionError
impl Send for SessionError
impl Sync for SessionError
impl Unpin for SessionError
impl UnsafeUnpin for SessionError
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