pub enum TrustRootError {
NotConfigured {
path: PathBuf,
},
Malformed {
path: PathBuf,
msg: String,
},
Empty {
path: PathBuf,
},
PermissionsTooOpen {
path: PathBuf,
mode: u32,
},
Io(Error),
}Expand description
Errors loading or operating on a trust root file.
Variants§
NotConfigured
The file does not exist. The caller should surface the actionable
remediation: run treeship trust add (or sync from a hub).
Malformed
JSON parse or schema validation failed.
Empty
The file exists and is well-formed but contains zero roots. Treated
the same as NotConfigured by verifiers but kept distinct so the
CLI can show a more targeted error.
PermissionsTooOpen
File mode allows group or world access. Refuse to load.
Io(Error)
Underlying I/O failure (read, write, mkdir).
Trait Implementations§
Source§impl Debug for TrustRootError
impl Debug for TrustRootError
Source§impl Display for TrustRootError
impl Display for TrustRootError
Source§impl Error for TrustRootError
impl Error for TrustRootError
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 TrustRootError
impl !RefUnwindSafe for TrustRootError
impl Send for TrustRootError
impl Sync for TrustRootError
impl Unpin for TrustRootError
impl UnsafeUnpin for TrustRootError
impl !UnwindSafe for TrustRootError
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