#[non_exhaustive]pub enum EventSourcedSignal {
SnapshotRecovered(SnapshotMetadata),
RecoveryCompleted,
RecoveryFailed(PersistenceError),
PersistFailed {
sequence_nr: SequenceNr,
error: PersistenceError,
},
PersistRejected {
sequence_nr: SequenceNr,
reason: String,
},
SnapshotCompleted(SnapshotMetadata),
SnapshotFailed {
metadata: SnapshotMetadata,
error: PersistenceError,
},
DeleteEventsCompleted(SequenceNr),
DeleteEventsFailed {
to: SequenceNr,
error: PersistenceError,
},
DeleteSnapshotsCompleted(SnapshotCriteria),
DeleteSnapshotsFailed {
criteria: SnapshotCriteria,
error: PersistenceError,
},
}Expand description
Persistence-specific lifecycle and maintenance signals.
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.
SnapshotRecovered(SnapshotMetadata)
A snapshot was decoded and installed during recovery.
RecoveryCompleted
Recovery completed, including for a fresh persistence id.
RecoveryFailed(PersistenceError)
Snapshot load or journal replay failed.
PersistFailed
Journal storage failed or the commit result was uncertain.
Fields
§
sequence_nr: SequenceNrFirst sequence number attempted by the failed write.
§
error: PersistenceErrorStorage failure.
PersistRejected
A deterministic write was rejected before storage.
Fields
§
sequence_nr: SequenceNrFirst sequence number attempted by the rejected write.
SnapshotCompleted(SnapshotMetadata)
Snapshot save completed.
SnapshotFailed
Snapshot save failed non-fatally.
Fields
§
metadata: SnapshotMetadataMetadata of the attempted snapshot.
§
error: PersistenceErrorSave or serialization failure.
DeleteEventsCompleted(SequenceNr)
Inclusive event deletion completed.
DeleteEventsFailed
Inclusive event deletion failed.
DeleteSnapshotsCompleted(SnapshotCriteria)
Snapshot criteria deletion completed.
DeleteSnapshotsFailed
Snapshot criteria deletion failed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventSourcedSignal
impl RefUnwindSafe for EventSourcedSignal
impl Send for EventSourcedSignal
impl Sync for EventSourcedSignal
impl Unpin for EventSourcedSignal
impl UnsafeUnpin for EventSourcedSignal
impl UnwindSafe for EventSourcedSignal
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
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<S> IntoEventHandlerResult<S> for S
impl<S> IntoEventHandlerResult<S> for S
Source§fn into_event_handler_result(self) -> Result<S, PersistenceError>
fn into_event_handler_result(self) -> Result<S, PersistenceError>
Converts this handler output into the runtime result.
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage