#[non_exhaustive]pub enum Error {
IllegalTransition {
from: &'static str,
to: &'static str,
},
Integrity {
expected: String,
actual: String,
},
NotFound {
what: String,
},
Unauthorized,
Malformed {
what: String,
},
Backend {
detail: String,
},
}Expand description
The error surface shared across Deputy. Kept small and #[non_exhaustive] so new
variants can be added without a breaking change.
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.
IllegalTransition
An artifact was asked to move along an edge the state machine does not permit.
See docs/PIPELINE.md §7.
Integrity
A downloaded artifact’s content hash did not match its pinned, expected hash.
NotFound
A referenced entity (artifact, repo, record) was not found.
The current actor lacks a valid mID session for a privileged operation.
Malformed
Input could not be parsed into a well-formed domain value.
Backend
A lower layer (storage, database, crypto, I/O) failed. Carries a human-readable detail; the originating crate keeps the richer typed error.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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