pub trait IOperationLog {
// Required methods
fn get_operation<'life0, 'async_trait>(
&'life0 self,
operation_id: OperationId,
) -> Pin<Box<dyn Future<Output = Option<OperationLogEntry>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_operation_dbtx<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut DatabaseTransaction<'life2>,
operation_id: OperationId,
) -> Pin<Box<dyn Future<Output = Option<OperationLogEntry>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn add_operation_log_entry_dbtx<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut DatabaseTransaction<'life2>,
operation_id: OperationId,
operation_type: &'life3 str,
operation_meta: Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn caching_operation_update_stream(
&self,
operation_id: OperationId,
stream_gen: Box<dyn FnOnce() -> BoxStream<'static, Value> + Send>,
is_terminal: Box<dyn Fn(&Value) -> bool + Send + Sync>,
) -> BoxStream<'static, Value>;
}Required Methods§
fn get_operation<'life0, 'async_trait>(
&'life0 self,
operation_id: OperationId,
) -> Pin<Box<dyn Future<Output = Option<OperationLogEntry>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_operation_dbtx<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut DatabaseTransaction<'life2>,
operation_id: OperationId,
) -> Pin<Box<dyn Future<Output = Option<OperationLogEntry>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_operation_log_entry_dbtx<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut DatabaseTransaction<'life2>,
operation_id: OperationId,
operation_type: &'life3 str,
operation_meta: Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn caching_operation_update_stream(
&self,
operation_id: OperationId,
stream_gen: Box<dyn FnOnce() -> BoxStream<'static, Value> + Send>,
is_terminal: Box<dyn Fn(&Value) -> bool + Send + Sync>,
) -> BoxStream<'static, Value>
fn caching_operation_update_stream( &self, operation_id: OperationId, stream_gen: Box<dyn FnOnce() -> BoxStream<'static, Value> + Send>, is_terminal: Box<dyn Fn(&Value) -> bool + Send + Sync>, ) -> BoxStream<'static, Value>
Wrap a module’s operation update stream so that its last update is
cached as the operation’s outcome — only when is_terminal reports
that update as a final state of the operation. Outcome resolution
(returning a cached outcome instead of a stream) happens in the typed
caller (crate::module::ClientContext::outcome_or_updates), which
can deserialize the cached value into the module’s update type and
fall back to this stream when that fails.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".