pub struct BitsRef<'a>(_);
Bits stored as a sequence of bytes (most significant bit first).
All of the bytes stored in the byte sequence: not just the ones actually used.
The number of bits used in the storage.
The used bytes of the byte sequence: bear in mind some of the bits in the
last byte may be unused.
Get the byte at a specific index.
Returns None
for out-of-bounds.
Count the set bits (O(n)).
Count the unset bits (O(n)).
Count the set bits before a position in the bits (O(n)).
Returns None
it the index is out of bounds.
Count the unset bits before a position in the bits (O(n)).
Returns None
it the index is out of bounds.
Find the position of a set bit by its rank (O(n)).
Returns None
if no suitable bit is found. It is
always the case otherwise that rank_ones(result) == Some(target_rank)
and get(result) == Some(true)
.
Find the position of an unset bit by its rank (O(n)).
Returns None
if no suitable bit is found. It is
always the case otherwise that rank_zeros(result) == Some(target_rank)
and get(result) == Some(false)
.
Formats the value using the given formatter. Read more
fn eq(&self, other: &Self) -> bool | [src] |
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
| 1.0.0 [src] |
This method tests for !=
.
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool
| 1.0.0 [src] |
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
| 1.0.0 [src] |
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
| 1.0.0 [src] |
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
| 1.0.0 [src] |
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Performs copy-assignment from source
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static