pub trait PersistentActor: 'static + Sized + Send + Sync {
Show 18 methods // Required method fn configure(types: &mut JournalTypes<Self>); // Provided methods fn persistence_key(&self, ctx: &ActorContext) -> String { ... } fn pre_recovery<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn post_recovery<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn stopped<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn persist<'life0, 'life1, 'life2, 'async_trait, M>( &'life0 self, message: &'life1 M, ctx: &'life2 mut ActorContext ) -> Pin<Box<dyn Future<Output = Result<(), PersistErr>> + Send + 'async_trait>> where Self: Recover<M> + 'async_trait, M: 'async_trait + Message, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn persist_batch<'life0, 'life1, 'async_trait>( &'life0 self, batch: EventBatch<Self>, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = Result<(), PersistErr>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn snapshot<'life0, 'life1, 'async_trait, S>( &'life0 self, snapshot: S, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = Result<(), PersistErr>> + Send + 'async_trait>> where Self: RecoverSnapshot<S> + 'async_trait, S: 'async_trait + Snapshot, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn recover<'life0, 'life1, 'async_trait>( &'life0 mut self, persistence_key: String, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = Recovery<Self>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn last_sequence_id(&self, ctx: &mut ActorContext) -> i64 { ... } fn read_messages<'a, 'life0, 'life1, 'async_trait>( &'life0 self, args: ReadMessages<'a>, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<JournalEntry>>>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn clear_old_messages<'life0, 'life1, 'async_trait>( &'life0 mut self, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn recovery_failure_policy(&self) -> RecoveryFailurePolicy { ... } fn persist_failure_policy(&self) -> PersistFailurePolicy { ... } fn event_batch(&self, ctx: &ActorContext) -> EventBatch<Self> { ... } fn on_recovery_err<'life0, 'life1, 'async_trait>( &'life0 mut self, _err: RecoveryErr, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn on_recovery_failed<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn on_child_stopped<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _id: &'life1 ActorId, _ctx: &'life2 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... }
}

Required Methods§

source

fn configure(types: &mut JournalTypes<Self>)

Provided Methods§

source

fn persistence_key(&self, ctx: &ActorContext) -> String

source

fn pre_recovery<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn post_recovery<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn stopped<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn persist<'life0, 'life1, 'life2, 'async_trait, M>( &'life0 self, message: &'life1 M, ctx: &'life2 mut ActorContext ) -> Pin<Box<dyn Future<Output = Result<(), PersistErr>> + Send + 'async_trait>>where Self: Recover<M> + 'async_trait, M: 'async_trait + Message, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn persist_batch<'life0, 'life1, 'async_trait>( &'life0 self, batch: EventBatch<Self>, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = Result<(), PersistErr>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn snapshot<'life0, 'life1, 'async_trait, S>( &'life0 self, snapshot: S, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = Result<(), PersistErr>> + Send + 'async_trait>>where Self: RecoverSnapshot<S> + 'async_trait, S: 'async_trait + Snapshot, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn recover<'life0, 'life1, 'async_trait>( &'life0 mut self, persistence_key: String, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = Recovery<Self>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn last_sequence_id(&self, ctx: &mut ActorContext) -> i64

source

fn read_messages<'a, 'life0, 'life1, 'async_trait>( &'life0 self, args: ReadMessages<'a>, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<JournalEntry>>>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn clear_old_messages<'life0, 'life1, 'async_trait>( &'life0 mut self, ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn recovery_failure_policy(&self) -> RecoveryFailurePolicy

source

fn persist_failure_policy(&self) -> PersistFailurePolicy

source

fn event_batch(&self, ctx: &ActorContext) -> EventBatch<Self>

source

fn on_recovery_err<'life0, 'life1, 'async_trait>( &'life0 mut self, _err: RecoveryErr, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn on_recovery_failed<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn on_child_stopped<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _id: &'life1 ActorId, _ctx: &'life2 mut ActorContext ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§