WritePartView

unsafe class WritePartView<T>

The WritePartView type is a write-only view into a PartList<T> chunk.

WritePartView 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

set(idx: int, elem: T) -> void

Sets the element at index idx in this view to elem.


writableSize() -> int

Returns the number of elements that can be written to 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.