pub trait TransactionCounterTrait {
// Required methods
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_and_increment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn decrement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
value: u64,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn sync_floor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
floor: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn drop_all_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_and_increment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn decrement<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
value: u64,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn sync_floor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
floor: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sync_floor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
relayer_id: &'life1 str,
address: &'life2 str,
floor: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Monotonically raise the counter to floor only if the current value is lower.
Used for race-safe bad-sequence recovery: the live chain sequence 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).
Sourcefn drop_all_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn drop_all_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RepositoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove all stored counter entries from the underlying backend.
Intended for startup reset flows when RESET_STORAGE_ON_START is enabled.