pub enum AuthFileError {
Io {
path: PathBuf,
message: String,
},
Parse {
path: PathBuf,
message: String,
},
SchemaVersionMismatch {
path: PathBuf,
found: u32,
expected: u32,
},
InsecurePermissions {
path: PathBuf,
mode: u32,
},
Serialize(String),
}Expand description
All the ways auth.toml loading can fail.
Variants§
Io
I/O failure (excluding NotFound, which is rendered as Ok(None)).
Parse
TOML parse failure on the resolved file.
Fields
SchemaVersionMismatch
schema_version does not match SCHEMA_VERSION.
Fields
InsecurePermissions
File permissions are too permissive (group- or world-readable). Bearer
tokens MUST be chmod 0600 per D28; we refuse to load any wider mode
so a leaked file (e.g. copied into a shared dir, baked into an image)
does not silently authenticate as the user.
Fields
Serialize(String)
TOML serialization failure on a write.
Trait Implementations§
Source§impl Debug for AuthFileError
impl Debug for AuthFileError
Source§impl Display for AuthFileError
impl Display for AuthFileError
Source§impl Error for AuthFileError
impl Error for AuthFileError
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()
Auto Trait Implementations§
impl Freeze for AuthFileError
impl RefUnwindSafe for AuthFileError
impl Send for AuthFileError
impl Sync for AuthFileError
impl Unpin for AuthFileError
impl UnsafeUnpin for AuthFileError
impl UnwindSafe for AuthFileError
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