Trait coerce::persistent::actor::PersistentActor
source · 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§
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,
Object Safety§
This trait is not object safe.