Trait snowbridge_core::ringbuffer::RingBufferMap
source · pub trait RingBufferMap<Key, Value, QueryKind>where
Key: FullCodec,
Value: FullCodec,
QueryKind: QueryKindTrait<Value, GetDefault>,{
// Required methods
fn insert(k: Key, v: Value);
fn contains_key(k: Key) -> bool;
fn get(k: Key) -> QueryKind::Query;
}
Expand description
Trait object presenting the ringbuffer interface.
Required Methods§
sourcefn contains_key(k: Key) -> bool
fn contains_key(k: Key) -> bool
Check if map contains a key
Object Safety§
This trait is not object safe.
Implementors§
impl<Key, Value, Index, B, CurrentIndex, Intermediate, M, QueryKind> RingBufferMap<Key, Value, QueryKind> for RingBufferMapImpl<Index, B, CurrentIndex, Intermediate, M, QueryKind>where
Key: FullCodec + Clone,
Value: FullCodec,
Index: Ord + One + Zero + Add<Output = Index> + Copy + FullCodec + Eq,
B: Get<Index>,
CurrentIndex: StorageValue<Index, Query = Index>,
Intermediate: StorageMap<Index, Key, Query = Key>,
M: StorageMap<Key, Value, Query = QueryKind::Query>,
QueryKind: QueryKindTrait<Value, GetDefault>,
Ringbuffer implementation based on RingBufferTransient