pub trait MessageStore: Send + Sync {
// Required methods
fn store<'life0, 'life1, 'async_trait>(
&'life0 self,
seq_num: u64,
message: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_range<'life0, 'async_trait>(
&'life0 self,
begin: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedMessage>, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn next_sender_seq(&self) -> u64;
fn next_target_seq(&self) -> u64;
fn set_next_sender_seq(&self, seq: u64);
fn set_next_target_seq(&self, seq: u64);
fn reset<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn creation_time(&self) -> SystemTime;
// Provided method
fn refresh<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
}Expand description
Abstract interface for FIX message storage.
Implementations of this trait provide persistence for outgoing messages to support resend requests and session recovery.
Required Methods§
Sourcefn store<'life0, 'life1, 'async_trait>(
&'life0 self,
seq_num: u64,
message: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn store<'life0, 'life1, 'async_trait>(
&'life0 self,
seq_num: u64,
message: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn get_range<'life0, 'async_trait>(
&'life0 self,
begin: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedMessage>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_range<'life0, 'async_trait>(
&'life0 self,
begin: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<OwnedMessage>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sourcefn next_sender_seq(&self) -> u64
fn next_sender_seq(&self) -> u64
Returns the next sender sequence number.
Sourcefn next_target_seq(&self) -> u64
fn next_target_seq(&self) -> u64
Returns the next expected target sequence number.
Sourcefn set_next_sender_seq(&self, seq: u64)
fn set_next_sender_seq(&self, seq: u64)
Sourcefn set_next_target_seq(&self, seq: u64)
fn set_next_target_seq(&self, seq: u64)
Sourcefn reset<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn reset<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Resets the store, clearing all messages and resetting sequence numbers.
§Errors
Returns StoreError if the reset fails.
Sourcefn creation_time(&self) -> SystemTime
fn creation_time(&self) -> SystemTime
Returns the creation time of the store/session.