pub trait TransactionCounterServiceTrait: Send + Sync {
// Required methods
fn get<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, TransactionCounterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_and_increment<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TransactionCounterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn decrement<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TransactionCounterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set<'life0, 'async_trait>(
&'life0 self,
value: u64,
) -> Pin<Box<dyn Future<Output = Result<(), TransactionCounterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_floor<'life0, 'async_trait>(
&'life0 self,
floor: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, TransactionCounterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn get<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, TransactionCounterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_and_increment<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TransactionCounterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn decrement<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TransactionCounterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set<'life0, 'async_trait>(
&'life0 self,
value: u64,
) -> Pin<Box<dyn Future<Output = Result<(), TransactionCounterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn sync_floor<'life0, 'async_trait>(
&'life0 self,
floor: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, TransactionCounterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_floor<'life0, 'async_trait>(
&'life0 self,
floor: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, TransactionCounterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Monotonically raise the counter to floor only if the current value is lower.
Used for race-safe sync with the live chain sequence: the chain value is treated as a
floor, never as the authoritative next assignment, so concurrent allocations that have
already advanced the counter beyond floor are never rewound. Returns the effective
value after the operation (always >= floor).