referrerpolicy=no-referrer-when-downgrade

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§

source

fn insert(k: Key, v: Value)

Insert a map entry.

source

fn contains_key(k: Key) -> bool

Check if map contains a key

source

fn get(k: Key) -> QueryKind::Query

Get the value of the key

Object Safety§

This trait is not object safe.

Implementors§

source§

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