ReadPartView

unsafe class ReadPartView<T>

The ReadPartView type is a read-only view into a PartList<T> chunk.

ReadPartView is in the Prelude, meaning it is always available and does not need to be imported.

This type is subscriptable and iterable.

API Reference

Methods

get(idx: int) -> T

Gets the element at index idx in this view.


readableSize() -> int

Returns the number of elements that can be read from this view.


begin() -> int

Returns the relative starting index of this view, where 0 is the first non-ghost element.


end() -> int

Returns the relative ending index (exclusive) of this view, where 0 is the first non-ghost element.


srcBegin() -> int

Returns the absolute starting index of this view within its source PartList.


srcEnd() -> int

Returns the absolute ending index (exclusive) of this view within its source PartList.


partNum() -> int

Returns this view's partition number.


src() -> PartList<T>

Returns the source PartList that this view references.