pub enum WriteError {
Transient(Transient),
Permanent(Permanent),
OutcomeUnknown(Failure),
}Expand description
Why writing events failed.
Variants§
Transient(Transient)
The write certainly stored nothing, and trying it again later may
succeed. A precondition that did not hold is a
Transient::Conflict.
Permanent(Permanent)
The write certainly stored nothing, and trying it again will not help, for example since it declares its preconditions wrongly, or since an event does not match its schema.
OutcomeUnknown(Failure)
The write failed in a way that leaves open whether the database stored
the events, so trying it again unchanged may store them twice. Find out
first, for example by reading the subject, or try again only with a
precondition that refuses the same events a second time, such as
Precondition::on_event_id. It
belongs to no category.
Trait Implementations§
Source§impl Categorized for WriteError
impl Categorized for WriteError
Source§impl Debug for WriteError
impl Debug for WriteError
Source§impl Display for WriteError
impl Display for WriteError
Source§impl Error for WriteError
impl Error for WriteError
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<Permanent> for WriteError
impl From<Permanent> for WriteError
Source§impl From<PreconditionsError> for WriteError
impl From<PreconditionsError> for WriteError
Source§fn from(refusal: PreconditionsError) -> Self
fn from(refusal: PreconditionsError) -> Self
Converts to this type from the input type.
Source§impl From<WriteError> for HttpError
impl From<WriteError> for HttpError
Source§fn from(error: WriteError) -> Self
fn from(error: WriteError) -> Self
Converts to this type from the input type.
Source§impl<D> From<WriteError> for Error<D>
impl<D> From<WriteError> for Error<D>
Source§fn from(failure: WriteError) -> Self
fn from(failure: WriteError) -> Self
Converts to this type from the input type.
Source§impl<D> From<WriteError> for ExecuteError<D>
impl<D> From<WriteError> for ExecuteError<D>
Source§fn from(failure: WriteError) -> Self
fn from(failure: WriteError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for WriteError
impl !UnwindSafe for WriteError
impl Freeze for WriteError
impl Send for WriteError
impl Sync for WriteError
impl Unpin for WriteError
impl UnsafeUnpin for WriteError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request