referrerpolicy=no-referrer-when-downgrade
snowbridge_core::ringbuffer

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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