struct

Base58::PointerCollection

Inherits Enumerable / Struct / Value / Object

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.

Constructors

new(pointer : Pointer(UInt8), size : Int32, position : Int32 = 0)
Source

Instance methods

each

Must yield this collection's elements to the block.

Source
pointer
Source
position
Source
size

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4
Source