Skip to main content

FixSeqStore

Trait FixSeqStore 

Source
pub trait FixSeqStore: Send + Sync {
    // Required methods
    fn next_out<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn peek_out<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn observed_in<'life0, 'async_trait>(
        &'life0 self,
        n: u64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn current_in<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn reset<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Persistence for the two sequence counters a FIX session must keep.

  • next_out returns the sequence number to stamp on the next outbound message and atomically advances the counter, so two concurrent sends can never reuse a number.
  • observed_in records that an inbound message with sequence number n was processed (tracking the high-water mark).
  • current_in returns the next expected inbound sequence number, i.e. one past the highest observed.
  • reset returns both counters to their initial state (used for ResetSeqNumFlag=Y logon and SequenceReset).

Required Methods§

Source

fn next_out<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The next outbound MsgSeqNum, advancing the counter.

Source

fn peek_out<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Peek the next outbound MsgSeqNum without advancing (for building a resend range or diagnostics).

Source

fn observed_in<'life0, 'async_trait>( &'life0 self, n: u64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record that an inbound message with MsgSeqNum == n was processed.

Source

fn current_in<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The next expected inbound MsgSeqNum (one past the highest observed).

Source

fn reset<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reset both counters to 1 (next outbound = 1, next expected inbound = 1).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§