pub trait MessageStore: Send {
// Required methods
fn next_sender_seq_num(&self) -> u64;
fn next_target_seq_num(&self) -> u64;
fn incr_next_sender_seq_num<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn incr_next_target_seq_num<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_next_sender_seq_num<'life0, 'async_trait>(
&'life0 mut self,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_next_target_seq_num<'life0, 'async_trait>(
&'life0 mut self,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn creation_time(&self) -> DateTime<Utc>;
fn save_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
seq_num: u64,
raw: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_messages<'life0, 'async_trait>(
&'life0 mut self,
begin: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(u64, Vec<u8>)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn refresh<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reset<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn save_message_and_incr<'life0, 'life1, 'async_trait>(
&'life0 mut self,
seq_num: u64,
raw: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Methods§
fn next_sender_seq_num(&self) -> u64
fn next_target_seq_num(&self) -> u64
fn incr_next_sender_seq_num<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn incr_next_target_seq_num<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_next_sender_seq_num<'life0, 'async_trait>(
&'life0 mut self,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_next_target_seq_num<'life0, 'async_trait>(
&'life0 mut self,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn creation_time(&self) -> DateTime<Utc>
Sourcefn save_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
seq_num: u64,
raw: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
seq_num: u64,
raw: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist an outgoing message under its seqnum.
Sourcefn get_messages<'life0, 'async_trait>(
&'life0 mut self,
begin: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(u64, Vec<u8>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_messages<'life0, 'async_trait>(
&'life0 mut self,
begin: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(u64, Vec<u8>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stored messages in [begin, end] as (seq_num, raw) pairs, ascending.
Missing seqnums are simply absent (the session layer gap-fills them).
Provided Methods§
Sourcefn save_message_and_incr<'life0, 'life1, 'async_trait>(
&'life0 mut self,
seq_num: u64,
raw: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_message_and_incr<'life0, 'life1, 'async_trait>(
&'life0 mut self,
seq_num: u64,
raw: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist and advance the sender seqnum as one operation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".