Struct hibitset::BitSet [] [src]

pub struct BitSet { /* fields omitted */ }

A BitSet is a simple set designed to track entity indices for which a certain component exists. It does not track the Generation of the entities that it contains.

Note, a BitSet is limited by design to only 1,048,576 indices. Adding beyond this limit will cause the BitSet to panic.

Methods

impl BitSet
[src]

[src]

Creates an empty BitSet.

[src]

Creates an empty BitSet, preallocated for up to max indices.

[src]

Adds id to the BitSet. Returns true if the value was already in the set.

[src]

Removes id from the set, returns true if the value was removed, and false if the value was not set to begin with.

[src]

Returns true if id is in the set.

[src]

Completely wipes out the bit set.

Trait Implementations

impl Not for BitSet
[src]

The resulting type after applying the ! operator.

[src]

Performs the unary ! operation.

impl<T> BitAnd<T> for BitSet where
    T: BitSetLike
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<T> BitOr<T> for BitSet where
    T: BitSetLike
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<T> BitXor<T> for BitSet where
    T: BitSetLike
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a> Not for &'a BitSet
[src]

The resulting type after applying the ! operator.

[src]

Performs the unary ! operation.

impl<'a, T> BitAnd<T> for &'a BitSet where
    T: BitSetLike
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a, T> BitOr<T> for &'a BitSet where
    T: BitSetLike
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a, T> BitXor<T> for &'a BitSet where
    T: BitSetLike
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl Clone for BitSet
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for BitSet
[src]

[src]

Formats the value using the given formatter.

impl Default for BitSet
[src]

[src]

Returns the "default value" for a type. Read more

impl BitSetLike for BitSet
[src]

[src]

Return a usize where each bit represents if any word in layer2 has been set. Read more

[src]

Return the usize from the array of usizes that indicates if any bit has been set in layer1 Read more

[src]

Return the usize from the array of usizes that indicates if any bit has been set in layer0 Read more

[src]

Return a usize that maps to the direct 1:1 association with each index of the set Read more

[src]

Create an iterator that will scan over the keyspace

[src]

Create a parallel iterator that will scan over the keyspace