#[non_exhaustive]pub enum PrivateFileError {
AlreadyExists,
Symlink,
NotRegularFile,
TooPermissive {
mode: u32,
},
TooLarge {
limit: usize,
},
WrongOwner {
uid: u32,
},
Io(Error),
}Expand description
Why a private file could not be created or read.
No variant carries any part of the file’s contents.
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.
AlreadyExists
The file exists and is never overwritten.
Symlink
The path is a symbolic link, which is refused for secret files.
NotRegularFile
The path is not a regular file.
TooPermissive
The file grants access to its group or to others.
TooLarge
The file is larger than its format allows.
WrongOwner
The file belongs to another user. Checked only for files that must be the operator’s own, such as the key file, and not when running as root.
Io(Error)
An operating-system error.
Trait Implementations§
Source§impl Debug for PrivateFileError
impl Debug for PrivateFileError
Source§impl Display for PrivateFileError
impl Display for PrivateFileError
Source§impl Error for PrivateFileError
impl Error for PrivateFileError
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 PrivateFileError
impl !UnwindSafe for PrivateFileError
impl Forget for PrivateFileError
impl Freeze for PrivateFileError
impl Move for PrivateFileError
impl Send for PrivateFileErrorwhere
Repr: Send,
impl Sync for PrivateFileErrorwhere
Repr: Sync,
impl Unpin for PrivateFileError
impl UnsafeUnpin for PrivateFileError
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