pub trait Journal:
Send
+ Sync
+ 'static {
// Required methods
fn write_messages<'life0, 'async_trait>(
&'life0 self,
messages: Vec<PersistentRepr>,
) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_messages_to<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
to_sequence_nr: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn replay_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from_sequence_nr: u64,
to_sequence_nr: u64,
max: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersistentRepr>, JournalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn highest_sequence_nr<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from_sequence_nr: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, JournalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn events_by_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
_tag: &'life1 str,
_from_offset: u64,
_max: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersistentRepr>, JournalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn all_persistence_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, JournalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn write_messages<'life0, 'async_trait>(
&'life0 self,
messages: Vec<PersistentRepr>,
) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_messages_to<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
to_sequence_nr: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn replay_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from_sequence_nr: u64,
to_sequence_nr: u64,
max: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersistentRepr>, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn highest_sequence_nr<'life0, 'life1, 'async_trait>(
&'life0 self,
persistence_id: &'life1 str,
from_sequence_nr: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn events_by_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
_tag: &'life1 str,
_from_offset: u64,
_max: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<PersistentRepr>, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn all_persistence_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn all_persistence_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, JournalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Distinct persistence ids known to the backend. Default impl returns empty so backends without an id index opt in.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".