#[non_exhaustive]pub enum RingEngineError {
NotInitialized,
GenesisAlreadyComplete,
ProcessorFailed {
unit: UnitId,
reason: String,
},
UnitDisabled {
unit: UnitId,
},
GateRejected(GateRejection),
Boundary(BoundaryError),
Core(SomaError),
CycleFailed {
cycle_index: u64,
reason: String,
},
}Expand description
Errors produced by ring engine operations.
Marked #[non_exhaustive] so adding a variant in a future minor release
is not a breaking change. Consumers must include a wildcard arm in any
exhaustive match.
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.
NotInitialized
Genesis has not been run yet.
GenesisAlreadyComplete
Genesis has already been completed.
ProcessorFailed
A unit’s processor returned an error.
The reason is an opaque string because the engine does not know
the concrete error type of registered crate::RingProcessor
implementations.
UnitDisabled
A unit has no registered processor.
GateRejected(GateRejection)
A BEFORE gate rejected the cycle.
Boundary(BoundaryError)
A boundary operation failed.
Core(SomaError)
A core structural operation failed.
CycleFailed
The ring cycle failed (aggregated reason).
Trait Implementations§
Source§impl Debug for RingEngineError
impl Debug for RingEngineError
Source§impl Display for RingEngineError
impl Display for RingEngineError
Source§impl Error for RingEngineError
impl Error for RingEngineError
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()
Source§impl From<BoundaryError> for RingEngineError
impl From<BoundaryError> for RingEngineError
Source§fn from(source: BoundaryError) -> Self
fn from(source: BoundaryError) -> Self
Converts to this type from the input type.
Source§impl From<GateRejection> for RingEngineError
impl From<GateRejection> for RingEngineError
Source§fn from(source: GateRejection) -> Self
fn from(source: GateRejection) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RingEngineError
impl RefUnwindSafe for RingEngineError
impl Send for RingEngineError
impl Sync for RingEngineError
impl Unpin for RingEngineError
impl UnsafeUnpin for RingEngineError
impl UnwindSafe for RingEngineError
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