Import std.collections.view
std.collections.view
Views that don't copy what they show: part of an array, which reads and sets it in place, and an array, Map, or Set to read but not change, to hand out. Each keeps what it shows alive and sees its changes. A slice, items[a..b], is still a copy.
std/collections/view.fb
Types
ArrayView
class
@DebugElements Public Class ArrayView<T> Implements Iterable<T>
Part of an array, whose elements it reads and sets in place, counting from its own start. Its Count is the part's own, which stays as the array changes, and an element the array no longer has panics.
std/collections/view.fb, line 40
-
How many elements it shows.
-
The element at index, from 0 to Count minus 1.
-
Gives the element at index, from 0 to Count minus 1, a new value, in the array.
-
Part of this view, from
startup tofinish, without the one atfinish. -
The elements, in a new array.
-
The elements, in order.
ArrayViewIterator
struct
Public Struct ArrayViewIterator<T> Implements Iterator<T>
The elements of an ArrayView, in order, which For ... In goes over.
std/collections/view.fb, line 110
-
The next value, or Null when there are no more.
Doc from
std.core.iterator.Iterator.Next.
ReadOnlyArray
class
@DebugElements Public Class ReadOnlyArray<T> Implements Iterable<T>
An array to read but not change, which AsReadOnly gives.
std/collections/view.fb, line 123
-
How many elements it holds.
-
The value at
index, which panics outside it. -
Whether it holds
value. -
The elements, in a new array, which can change.
-
Its values, from the first, in an Iterator of their own.
Doc from
std.core.iterator.Iterable.Iterate.
ReadOnlyMap
class
@DebugEntries Public Class ReadOnlyMap<K: Hashable, V> Implements Iterable<(K, V)>
A Map to read but not change, which AsReadOnly gives.
std/collections/view.fb, line 153
-
How many entries it holds.
-
The key's value, or the Map's default when it isn't there, or a panic when it has none.
-
The value of
key, or Null when it has none. -
The value of
key, orfallbackwhen it has none. -
Whether
keyhas an entry. -
Its keys, in order, in a new array.
-
Its values, in order, in a new array.
-
The entries, in a new Map, which can change.
-
Its values, from the first, in an Iterator of their own.
Doc from
std.core.iterator.Iterable.Iterate.
ReadOnlySet
class
@DebugElements Public Class ReadOnlySet<T: Hashable> Implements Iterable<T>
A Set to read but not change, which AsReadOnly gives.
std/collections/view.fb, line 192
-
How many values it holds.
-
Whether it holds
value. -
The values, in a new array.
-
The values, in a new Set, which can change.
-
Its values, from the first, in an Iterator of their own.
Doc from
std.core.iterator.Iterable.Iterate.
Extends
T[]
extend
Extend T[]
No doc comment.
std/collections/view.fb, line 10
-
The elements from
startup tofinish, without the one atfinish, as a view of them in the array. They have to be in the array. -
The array, to read but not change.
Map
extend
Extend Map<K, V>
No doc comment.
std/collections/view.fb, line 27
-
The Map, to read but not change.
Set
extend
Extend Set<T>
No doc comment.
std/collections/view.fb, line 32
-
The Set, to read but not change.
ArrayView
extend
Extend ArrayView<T> Implements Printable
No doc comment.
std/collections/view.fb, line 218
-
Its text, as a string interpolation like "{value}" shows it.
Doc from
std.core.interfaces.Printable.ToString.
ReadOnlyArray
extend
Extend ReadOnlyArray<T> Implements Printable
No doc comment.
std/collections/view.fb, line 225
-
Its text, as a string interpolation like "{value}" shows it.
Doc from
std.core.interfaces.Printable.ToString.
ReadOnlyMap
extend
Extend ReadOnlyMap<K, V> Implements Printable
No doc comment.
std/collections/view.fb, line 231
-
Its text, as a string interpolation like "{value}" shows it.
Doc from
std.core.interfaces.Printable.ToString.
ReadOnlySet
extend
Extend ReadOnlySet<T> Implements Printable
No doc comment.
std/collections/view.fb, line 238
-
Its text, as a string interpolation like "{value}" shows it.
Doc from
std.core.interfaces.Printable.ToString.
Report an issue with this page or with FutureBlitz on GitHub.