#[non_exhaustive]pub enum VersionFileError {
FileNotFound(PathBuf),
NoVersionField,
WriteFailed(Error),
ReadFailed(Error),
InvalidRegex(String),
}Expand description
Errors that can occur when reading or writing version files.
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.
FileNotFound(PathBuf)
The expected file was not found on disk.
NoVersionField
The file does not contain a version field this engine can handle.
WriteFailed(Error)
Writing the updated content back to disk failed.
ReadFailed(Error)
Reading the file from disk failed.
InvalidRegex(String)
A user-supplied regex pattern is invalid or has no capture groups.
Trait Implementations§
Source§impl Debug for VersionFileError
impl Debug for VersionFileError
Source§impl Display for VersionFileError
impl Display for VersionFileError
Source§impl Error for VersionFileError
impl Error for VersionFileError
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 Freeze for VersionFileError
impl !RefUnwindSafe for VersionFileError
impl Send for VersionFileError
impl Sync for VersionFileError
impl Unpin for VersionFileError
impl UnsafeUnpin for VersionFileError
impl !UnwindSafe for VersionFileError
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