class Deque(T)
Overview
A Deque ("double-ended queue") is a collection of objects of type T that behaves much like an Array.
Deque has a subset of Array's API. It performs better than an Array
when there are frequent insertions or deletions
of items near the beginning or the end.
The most typical use case of a Deque is a queue: use push
to add items to the end of the queue and shift
to get
and remove the item at the beginning of the queue.
This Deque is implemented with a dynamic array used as a circular buffer.
Included Modules
- Indexable::Mutable(T)
Defined in:
ssz/codec.crClass Method Summary
Instance methods inherited from module Enumerable(T)
hash_tree_root : Bytes
hash_tree_root,
ssz_basic? : Bool
ssz_basic?,
ssz_encode(io : IO)
ssz_encode,
ssz_size : Int32
ssz_size,
ssz_variable? : Bool
ssz_variable?
Class methods inherited from module Enumerable(T)
ssz_basic? : Bool
ssz_basic?
Instance methods inherited from class Object
ssz_basic? : Bool
ssz_basic?,
ssz_encode(io : IO)ssz_encode : Bytes ssz_encode, ssz_fixed? : Bool ssz_fixed?, ssz_size : Int32 ssz_size, ssz_variable? : Bool ssz_variable?
Class methods inherited from class Object
ssz_basic? : Bool
ssz_basic?,
ssz_decode(io : IO, size : Int32 = 0)ssz_decode(bytes : Bytes) ssz_decode, ssz_fixed? : Bool ssz_fixed?, ssz_variable? : Bool ssz_variable?