pub enum G8Error {
InvalidId(String),
InvalidAnnotation(String),
InvalidStatusTransition {
from: PlanStatus,
to: PlanStatus,
},
UnknownSubstrate(String),
Io(Error),
Serde(Error),
}Expand description
Errors originating in g8-core.
Downstream crates define their own error types (e.g. StoreError,
ExtractorError) and convert from G8Error via #[from].
§Examples
use g8_core::G8Error;
let e = G8Error::InvalidId("empty string".into());
assert!(e.to_string().contains("invalid ID"));Variants§
InvalidId(String)
An ID string was invalid (empty or otherwise malformed).
InvalidAnnotation(String)
A magic-comment annotation could not be parsed.
InvalidStatusTransition
A plan status transition is not permitted by the lifecycle graph.
UnknownSubstrate(String)
A substrate name was referenced that has not been registered.
Io(Error)
An I/O error propagated from a caller.
Serde(Error)
A serde_json error propagated from a caller.
Trait Implementations§
Source§impl Error for G8Error
impl Error for G8Error
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 G8Error
impl !UnwindSafe for G8Error
impl Freeze for G8Error
impl Send for G8Error
impl Sync for G8Error
impl Unpin for G8Error
impl UnsafeUnpin for G8Error
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