pub trait ScheduledCommandRepository: Send + Sync {
// Required methods
fn supports_scheduled_commands(&self) -> bool;
fn schedule_command<'life0, 'life1, 'async_trait>(
&'life0 self,
command: &'life1 ScheduledCommand,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn process_commands<'life0, 'life1, 'async_trait>(
&'life0 self,
as_of: DateTime<Utc>,
handler: &'life1 (dyn Fn(ScheduledCommand) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync),
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Persistence for scheduled commands.
Required Methods§
fn supports_scheduled_commands(&self) -> bool
fn schedule_command<'life0, 'life1, 'async_trait>(
&'life0 self,
command: &'life1 ScheduledCommand,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_commands<'life0, 'life1, 'async_trait>(
&'life0 self,
as_of: DateTime<Utc>,
handler: &'life1 (dyn Fn(ScheduledCommand) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync),
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".