hyperlane_plugin_idempotency/type.rs
1use super::*;
2
3/// Boxed `Send` future returned by asynchronous [`IdempotencyStore`] trait methods.
4pub type IdempotencyFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
5
6/// Thread-safe shared reference to a pluggable [`IdempotencyStore`].
7pub type SharedIdempotencyStore = Arc<dyn IdempotencyStore>;
8
9/// 64-way sharded hash table array backing [`InMemoryIdempotencyStore`].
10pub(crate) type IdempotencyShardArray =
11 Box<[RwLock<HashMapXxHash3_64<String, IdempotencySlot>>; IDEMPOTENCY_SHARD_COUNT]>;