Skip to main content

Error

Enum Error 

Source
pub enum Error<E = Infallible> {
Show 40 variants ShutdownTimeout { phase: &'static str, }, Unauthenticated, PermissionDenied, RecordSchema { source: Error, }, RecordPayload { source: PayloadError, }, RecordDeclaration { source: DecodeError, }, OperationRefused(Refusal), OperationLaneCycle { parent: &'static str, child: &'static str, }, OperationUnauthorized { caller: String, owner: String, operation: String, }, OperationPayload { operation: String, source: MessageError, }, OperationPanicked { operation: String, }, OperationDeclaration { source: Error, }, OperationFailed { operation: String, source: Arc<dyn Error + Send + Sync>, }, OperationFinalization { operation: String, outcome: Option<Arc<Error>>, source: Arc<Error>, }, OperationSettlement { source: Arc<Error>, }, TaskFailed { domain: &'static str, source: Arc<dyn Error + Send + Sync>, }, NotReady { domain: &'static str, }, Persistence { source: Arc<Error>, }, Closing { domain: &'static str, }, AlreadyRegistered { domain: &'static str, name: String, }, NotRegistered { domain: &'static str, name: String, }, Backend { operation: &'static str, kind: BackendFailure, source: Box<dyn Error + Send + Sync>, }, InvalidInput { field: &'static str, reason: &'static str, }, ResourceExhausted { resource: &'static str, }, DifferentHistory, ViewExpired, Gap { requested: u64, available: u64, }, CaptureFailed, IncompleteCommit, Preparation(PreparationError), Rejected(E), UndoConflict(E), RedoConflict(E), NothingToUndo, NothingToRedo, OriginAhead, FrontierAhead, BeneathHorizon, BeyondTail, Unavailable,
}

Variants§

§

ShutdownTimeout

Fields

§phase: &'static str
§

Unauthenticated

§

PermissionDenied

§

RecordSchema

Fields

§source: Error
§

RecordPayload

Fields

§

RecordDeclaration

Fields

§

OperationRefused(Refusal)

§

OperationLaneCycle

Fields

§parent: &'static str
§child: &'static str
§

OperationUnauthorized

Fields

§caller: String
§owner: String
§operation: String
§

OperationPayload

Fields

§operation: String
§

OperationPanicked

Fields

§operation: String
§

OperationDeclaration

Fields

§source: Error
§

OperationFailed

Fields

§operation: String
§source: Arc<dyn Error + Send + Sync>
§

OperationFinalization

Fields

§operation: String
§outcome: Option<Arc<Error>>
§source: Arc<Error>
§

OperationSettlement

Fields

§source: Arc<Error>
§

TaskFailed

Fields

§domain: &'static str
§source: Arc<dyn Error + Send + Sync>
§

NotReady

Fields

§domain: &'static str
§

Persistence

Fields

§source: Arc<Error>
§

Closing

Fields

§domain: &'static str
§

AlreadyRegistered

Fields

§domain: &'static str
§name: String
§

NotRegistered

Fields

§domain: &'static str
§name: String
§

Backend

Fields

§operation: &'static str
§source: Box<dyn Error + Send + Sync>
§

InvalidInput

Fields

§field: &'static str
§reason: &'static str
§

ResourceExhausted

Fields

§resource: &'static str
§

DifferentHistory

§

ViewExpired

§

Gap

Fields

§requested: u64
§available: u64
§

CaptureFailed

§

IncompleteCommit

§

Preparation(PreparationError)

§

Rejected(E)

§

UndoConflict(E)

§

RedoConflict(E)

§

NothingToUndo

§

NothingToRedo

§

OriginAhead

§

FrontierAhead

§

BeneathHorizon

§

BeyondTail

§

Unavailable

Implementations§

Source§

impl<E> Error<E>

Source

pub fn failure(&self) -> Option<&Failure>

Source

pub fn backend( operation: &'static str, kind: BackendFailure, source: impl Error + Send + Sync + 'static, ) -> Self

Trait Implementations§

Source§

impl<E: Debug> Debug for Error<E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<E> Display for Error<E>
where E: Display,

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<E> Error for Error<E>
where Self: Debug + Display,

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<E> From<ContextError> for Error<E>

Source§

fn from(error: ContextError) -> Self

Converts to this type from the input type.
Source§

impl<E> From<Error> for Error<E>

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl<E> From<Error> for Error<E>

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl<E> From<Refusal> for Error<E>

Source§

fn from(source: Refusal) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<E = !> !RefUnwindSafe for Error<E>

§

impl<E = !> !UnwindSafe for Error<E>

§

impl<E> Freeze for Error<E>
where E: Freeze,

§

impl<E> Send for Error<E>
where E: Send,

§

impl<E> Sync for Error<E>
where E: Sync,

§

impl<E> Unpin for Error<E>
where E: Unpin,

§

impl<E> UnsafeUnpin for Error<E>
where E: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<C, T> Catalogued<C> for T
where T: Into<C>,

Source§

fn catalogued(self) -> C

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Mutual<T> for T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R> RecordProjection<R> for R

Source§

fn project(&self) -> Option<&R>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more