pub enum LockfileError {
Io {
source: Error,
path: Option<PathBuf>,
},
ParseJson {
source: Error,
path: Option<PathBuf>,
},
Schema {
message: String,
path: Option<PathBuf>,
},
}Expand description
Failures returned from parsing or validating agents.lock.
Variants§
Io
Filesystem access failure (open, read, write, permission denied).
Routed through a dedicated variant so a permission-denied on
agents.lock is not rendered to the user as “failed schema
validation” — the previous code wrapped every std::io::Error
in Schema { message: "io error: ..." }, which was misleading.
ParseJson
The source text was not valid JSON.
Schema
The JSON parsed but did not match the lockfile schema.
Implementations§
Trait Implementations§
Source§impl Debug for LockfileError
impl Debug for LockfileError
Source§impl Display for LockfileError
impl Display for LockfileError
Source§impl Error for LockfileError
impl Error for LockfileError
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 LockfileError
impl !RefUnwindSafe for LockfileError
impl Send for LockfileError
impl Sync for LockfileError
impl Unpin for LockfileError
impl UnsafeUnpin for LockfileError
impl !UnwindSafe for LockfileError
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