struct Base58::PointerCollection
- Base58::PointerCollection
- Struct
- Value
- Object
Overview
This is essentially a lightweight Slice. It exists only to provide an Enumerable interface to a Pointer. The jury is still out on whether there is any point to this versus just using Slice. I did some quick benchmarks to justify this, but there needs to be more due diligence.
To use this, you need to pass in a pointer, the size of the pointer, and optionally the starting position within the pointer. It is up to you to ensure that the size of the pointer is accurate. No other bounds checking will be done.
Included Modules
- Enumerable(UInt8)
Defined in:
base58/pointer_collection.crConstructors
Instance Method Summary
-
#each(&)
Must yield this collection's elements to the block.
- #pointer : Pointer(UInt8)
- #position : Int32
-
#size : Int32
Returns the number of elements in the collection.
Constructor Detail
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(UInt8)
Must yield this collection's elements to the block.
def size : Int32
#
Description copied from module Enumerable(UInt8)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4