pub struct BitVector58(u64);
Expand description

A BitVector implementation that uses u64 as the underlying representation and can therefore hold only up-to 58 values (remaining 6 bits store the vector length). Should be pretty fast though.

BitVector58 is also Copy, because it is small enough to pass by value.

Tuple Fields

0: u64

Implementations

(internal) Check if the given index is valid in this BitVector - panic otherwise.

Trait Implementations

If a BitVector implementation cannot handle arbitrary vector lengths, it can use this method to declare the largest bitvector it can handle. Read more

Create a new BitVector with the given length. Can panic if this implementation does not support the specified length. Once created, the length cannot be changed. Read more

The number of elements stored in this BitVector.

Get the boolean value at the given index.

Set the boolean value at the given index.

Invert the value at the given index.

Create a new BitVector which contains items specified in the given vector.

Return a vector of the values in this BitVector.

A vector of the indices of this BitVector which are set.

A vector of the indices of this BitVector which are not set.

A helper method for Display trait implementations for all variants of BitVector. Please use this method (or an equivalent display format) for all Display implementations of BitVectors. Read more

A helper method for converting a vector of Booleans into a BitVector. Useful when implementing From<Vec<bool>>. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.