Re-exported from alloc::collections::arena_map::ArenaSet.
forall K, 'k.
struct ArenaSet { ... }
A set, in insertion order: an ArenaMap whose values say nothing.
Methods
method newsource
forall C, R where Allocate[C -> 'k, R].
fn new(&cx: C) -> ArenaSet[K, 'k] { ... }
An empty set in the context's arena.
method lensource
forall C, R where Access[C -> 'k, R].
fn len(self, &cx: C) -> usize { ... }
How many keys are in the set.
method is_emptysource
forall C, R where Access[C -> 'k, R].
fn is_empty(self, &cx: C) -> bool { ... }
Whether the set holds no keys.
method addresssource
fn address(self) -> usize { ... }
The set's identity: equal for copies of one set, different for different sets.
method positionssource
forall C, R where Access[C -> 'k, R].
fn positions(self, &cx: C) -> usize { ... }
The number of positions key_at reads. As for ArenaMap: positions 0..positions() hold the keys, or none where one was removed.
method key_atsource
forall C, R where Access[C -> 'k, R].
fn key_at(self, &cx: C, i: usize) -> Option[K] { ... }
The key at a position, unless it was removed.
method keyssource
forall C, R, Q where Access[C -> 'k, R], Allocate[C -> 'k, Q].
fn keys(self, &cx: C) -> ArenaVec[K, 'k] { ... }
The keys, in insertion order, in a new vec.
method eachsource
forall Env, C, R where Access[C -> 'k, R], Copy[Env].
fn each(self, &cx: C, f: closure[Env](&_: C, K) -> ()) { ... }
f on each key, in insertion order.
method anysource
forall Env, C, R where Access[C -> 'k, R], Copy[Env].
fn any(self, &cx: C, f: closure[Env](&_: C, K) -> bool) -> bool { ... }
Whether f holds for some key.
method allsource
forall Env, C, R where Access[C -> 'k, R], Copy[Env].
fn all(self, &cx: C, f: closure[Env](&_: C, K) -> bool) -> bool { ... }
Whether f holds for every key.
method containssource
forall C, R where Access[C -> 'k, R], HashIn[K, C].
fn contains(self, &cx: C, key: K) -> bool { ... }
Whether key is in the set.
method insertsource
forall C, R, Q where Access[C -> 'k, R], Allocate[C -> 'k, Q], HashIn[K, C].
fn insert(self, &cx: C, key: K) -> bool { ... }
Adds key; whether it was not there before.
method insert_allsource
forall C, R, Q where Access[C -> 'k, R], Allocate[C -> 'k, Q], HashIn[K, C].
fn insert_all(self, &cx: C, keys: ArenaVec[K, 'k]) { ... }
Adds each of keys, in order.
method unionsource
forall C, R, Q where Access[C -> 'k, R], Allocate[C -> 'k, Q], HashIn[K, C].
fn union(self, &cx: C, other: ArenaSet[K, 'k]) -> ArenaSet[K, 'k] { ... }
The keys of self, then those of other it lacks, in a new set.
method intersectionsource
forall C, R, Q where Access[C -> 'k, R], Allocate[C -> 'k, Q], HashIn[K, C].
fn intersection(self, &cx: C, other: ArenaSet[K, 'k]) -> ArenaSet[K, 'k] { ... }
The keys of self that other holds too, in self's order, in a new set.
method differencesource
forall C, R, Q where Access[C -> 'k, R], Allocate[C -> 'k, Q], HashIn[K, C].
fn difference(self, &cx: C, other: ArenaSet[K, 'k]) -> ArenaSet[K, 'k] { ... }
The keys of self that other lacks, in self's order, in a new set.
method retainsource
forall Env, C, R where Access[C -> 'k, R], Copy[Env].
fn retain(self, &cx: C, f: closure[Env](&_: C, K) -> bool) { ... }
Keeps the keys f holds for, in their order (ArenaMap::retain).
method removesource
forall C, R where Access[C -> 'k, R], HashIn[K, C].
fn remove(self, &cx: C, key: K) -> bool { ... }
Takes key out; whether it was there.
method clonesource
forall C, R, Q where Access[C -> 'k, R], Allocate[C -> 'k, Q], HashIn[K, C].
fn clone(self, &cx: C) -> ArenaSet[K, 'k] { ... }
The same keys, in the same order, in a set of their own.
method clearsource
forall C, R where Access[C -> 'k, R].
fn clear(self, &cx: C) { ... }
Removes every key, keeping the room (ArenaMap::clear).
method assignsource
forall C, R, Q where Access[C -> 'k, R], Allocate[C -> 'k, Q].
fn assign(self, &cx: C, other: ArenaSet[K, 'k]) { ... }
Makes the set hold other's keys, in their order, in the room it already has (ArenaMap::assign).