#[repr(transparent)]pub struct LE<B: BitBlock>(pub B);
Expand description
Tuple Fields§
§0: B
Trait Implementations§
source§impl<B: BitBlock> BitAndAssign<LE<B>> for LE<B>
impl<B: BitBlock> BitAndAssign<LE<B>> for LE<B>
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moresource§impl BitBlock for LE<u128>
impl BitBlock for LE<u128>
const ZERO: Self = _
source§const UPSTREAM_ONE: Self = _
const UPSTREAM_ONE: Self = _
As of now, this value is not
1
for unsigned integers UPSTREAM_ONE.wrapping_shift_upstream(1)
should be 0
.
For example, for u8, this value is 0x80
(0b10000000
).source§const BITS: usize = 128usize
const BITS: usize = 128usize
Represents the number of bits in a block. It is generally a good idea for this number to be a power of two.
source§fn wrapping_shift_downstream(self, n: usize) -> Self
fn wrapping_shift_downstream(self, n: usize) -> Self
Shifts
self
n
bits in the indexing direction.source§fn wrapping_shift_upstream(self, n: usize) -> Self
fn wrapping_shift_upstream(self, n: usize) -> Self
Shifts
self
n
bits against the indexing direction.source§fn leading_zeros(self) -> usize
fn leading_zeros(self) -> usize
Gets the leading zeros in the indexing direction.
source§fn leading_ones(self) -> usize
fn leading_ones(self) -> usize
Gets the leading ones in the indexing direction.
source§fn get_block_index(idx: usize) -> usize
fn get_block_index(idx: usize) -> usize
Returns the index of the block holding the bit at the specified location in a collection (eg. for a
u8
, get_block_index(9) == 2
).source§fn bit_index_from_block_index(idx: usize) -> usize
fn bit_index_from_block_index(idx: usize) -> usize
Returns the index of the first bit in the block at
idx
..source§fn wrapping_test_bit(self, idx: usize) -> bool
fn wrapping_test_bit(self, idx: usize) -> bool
Returns true if the bit at
idx
is 1
.source§fn wrapping_with_bit(self, idx: usize) -> Self
fn wrapping_with_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 1
.source§fn wrapping_without_bit(self, idx: usize) -> Self
fn wrapping_without_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 0
.source§impl BitBlock for LE<u16>
impl BitBlock for LE<u16>
const ZERO: Self = _
source§const UPSTREAM_ONE: Self = _
const UPSTREAM_ONE: Self = _
As of now, this value is not
1
for unsigned integers UPSTREAM_ONE.wrapping_shift_upstream(1)
should be 0
.
For example, for u8, this value is 0x80
(0b10000000
).source§const BITS: usize = 16usize
const BITS: usize = 16usize
Represents the number of bits in a block. It is generally a good idea for this number to be a power of two.
source§fn wrapping_shift_downstream(self, n: usize) -> Self
fn wrapping_shift_downstream(self, n: usize) -> Self
Shifts
self
n
bits in the indexing direction.source§fn wrapping_shift_upstream(self, n: usize) -> Self
fn wrapping_shift_upstream(self, n: usize) -> Self
Shifts
self
n
bits against the indexing direction.source§fn leading_zeros(self) -> usize
fn leading_zeros(self) -> usize
Gets the leading zeros in the indexing direction.
source§fn leading_ones(self) -> usize
fn leading_ones(self) -> usize
Gets the leading ones in the indexing direction.
source§fn get_block_index(idx: usize) -> usize
fn get_block_index(idx: usize) -> usize
Returns the index of the block holding the bit at the specified location in a collection (eg. for a
u8
, get_block_index(9) == 2
).source§fn bit_index_from_block_index(idx: usize) -> usize
fn bit_index_from_block_index(idx: usize) -> usize
Returns the index of the first bit in the block at
idx
..source§fn wrapping_test_bit(self, idx: usize) -> bool
fn wrapping_test_bit(self, idx: usize) -> bool
Returns true if the bit at
idx
is 1
.source§fn wrapping_with_bit(self, idx: usize) -> Self
fn wrapping_with_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 1
.source§fn wrapping_without_bit(self, idx: usize) -> Self
fn wrapping_without_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 0
.source§impl BitBlock for LE<u32>
impl BitBlock for LE<u32>
const ZERO: Self = _
source§const UPSTREAM_ONE: Self = _
const UPSTREAM_ONE: Self = _
As of now, this value is not
1
for unsigned integers UPSTREAM_ONE.wrapping_shift_upstream(1)
should be 0
.
For example, for u8, this value is 0x80
(0b10000000
).source§const BITS: usize = 32usize
const BITS: usize = 32usize
Represents the number of bits in a block. It is generally a good idea for this number to be a power of two.
source§fn wrapping_shift_downstream(self, n: usize) -> Self
fn wrapping_shift_downstream(self, n: usize) -> Self
Shifts
self
n
bits in the indexing direction.source§fn wrapping_shift_upstream(self, n: usize) -> Self
fn wrapping_shift_upstream(self, n: usize) -> Self
Shifts
self
n
bits against the indexing direction.source§fn leading_zeros(self) -> usize
fn leading_zeros(self) -> usize
Gets the leading zeros in the indexing direction.
source§fn leading_ones(self) -> usize
fn leading_ones(self) -> usize
Gets the leading ones in the indexing direction.
source§fn get_block_index(idx: usize) -> usize
fn get_block_index(idx: usize) -> usize
Returns the index of the block holding the bit at the specified location in a collection (eg. for a
u8
, get_block_index(9) == 2
).source§fn bit_index_from_block_index(idx: usize) -> usize
fn bit_index_from_block_index(idx: usize) -> usize
Returns the index of the first bit in the block at
idx
..source§fn wrapping_test_bit(self, idx: usize) -> bool
fn wrapping_test_bit(self, idx: usize) -> bool
Returns true if the bit at
idx
is 1
.source§fn wrapping_with_bit(self, idx: usize) -> Self
fn wrapping_with_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 1
.source§fn wrapping_without_bit(self, idx: usize) -> Self
fn wrapping_without_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 0
.source§impl BitBlock for LE<u64>
impl BitBlock for LE<u64>
const ZERO: Self = _
source§const UPSTREAM_ONE: Self = _
const UPSTREAM_ONE: Self = _
As of now, this value is not
1
for unsigned integers UPSTREAM_ONE.wrapping_shift_upstream(1)
should be 0
.
For example, for u8, this value is 0x80
(0b10000000
).source§const BITS: usize = 64usize
const BITS: usize = 64usize
Represents the number of bits in a block. It is generally a good idea for this number to be a power of two.
source§fn wrapping_shift_downstream(self, n: usize) -> Self
fn wrapping_shift_downstream(self, n: usize) -> Self
Shifts
self
n
bits in the indexing direction.source§fn wrapping_shift_upstream(self, n: usize) -> Self
fn wrapping_shift_upstream(self, n: usize) -> Self
Shifts
self
n
bits against the indexing direction.source§fn leading_zeros(self) -> usize
fn leading_zeros(self) -> usize
Gets the leading zeros in the indexing direction.
source§fn leading_ones(self) -> usize
fn leading_ones(self) -> usize
Gets the leading ones in the indexing direction.
source§fn get_block_index(idx: usize) -> usize
fn get_block_index(idx: usize) -> usize
Returns the index of the block holding the bit at the specified location in a collection (eg. for a
u8
, get_block_index(9) == 2
).source§fn bit_index_from_block_index(idx: usize) -> usize
fn bit_index_from_block_index(idx: usize) -> usize
Returns the index of the first bit in the block at
idx
..source§fn wrapping_test_bit(self, idx: usize) -> bool
fn wrapping_test_bit(self, idx: usize) -> bool
Returns true if the bit at
idx
is 1
.source§fn wrapping_with_bit(self, idx: usize) -> Self
fn wrapping_with_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 1
.source§fn wrapping_without_bit(self, idx: usize) -> Self
fn wrapping_without_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 0
.source§impl BitBlock for LE<u8>
impl BitBlock for LE<u8>
const ZERO: Self = _
source§const UPSTREAM_ONE: Self = _
const UPSTREAM_ONE: Self = _
As of now, this value is not
1
for unsigned integers UPSTREAM_ONE.wrapping_shift_upstream(1)
should be 0
.
For example, for u8, this value is 0x80
(0b10000000
).source§const BITS: usize = 8usize
const BITS: usize = 8usize
Represents the number of bits in a block. It is generally a good idea for this number to be a power of two.
source§fn wrapping_shift_downstream(self, n: usize) -> Self
fn wrapping_shift_downstream(self, n: usize) -> Self
Shifts
self
n
bits in the indexing direction.source§fn wrapping_shift_upstream(self, n: usize) -> Self
fn wrapping_shift_upstream(self, n: usize) -> Self
Shifts
self
n
bits against the indexing direction.source§fn leading_zeros(self) -> usize
fn leading_zeros(self) -> usize
Gets the leading zeros in the indexing direction.
source§fn leading_ones(self) -> usize
fn leading_ones(self) -> usize
Gets the leading ones in the indexing direction.
source§fn get_block_index(idx: usize) -> usize
fn get_block_index(idx: usize) -> usize
Returns the index of the block holding the bit at the specified location in a collection (eg. for a
u8
, get_block_index(9) == 2
).source§fn bit_index_from_block_index(idx: usize) -> usize
fn bit_index_from_block_index(idx: usize) -> usize
Returns the index of the first bit in the block at
idx
..source§fn wrapping_test_bit(self, idx: usize) -> bool
fn wrapping_test_bit(self, idx: usize) -> bool
Returns true if the bit at
idx
is 1
.source§fn wrapping_with_bit(self, idx: usize) -> Self
fn wrapping_with_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 1
.source§fn wrapping_without_bit(self, idx: usize) -> Self
fn wrapping_without_bit(self, idx: usize) -> Self
Returns
self
with the bit at idx
set to 0
.source§impl<B: BitBlock> BitOrAssign<LE<B>> for LE<B>
impl<B: BitBlock> BitOrAssign<LE<B>> for LE<B>
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moresource§impl<B: Ord + BitBlock> Ord for LE<B>
impl<B: Ord + BitBlock> Ord for LE<B>
source§impl<B: PartialEq + BitBlock> PartialEq<LE<B>> for LE<B>
impl<B: PartialEq + BitBlock> PartialEq<LE<B>> for LE<B>
source§impl<B: PartialOrd + BitBlock> PartialOrd<LE<B>> for LE<B>
impl<B: PartialOrd + BitBlock> PartialOrd<LE<B>> for LE<B>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<B: Copy + BitBlock> Copy for LE<B>
impl<B: Eq + BitBlock> Eq for LE<B>
impl<B: BitBlock> StructuralEq for LE<B>
impl<B: BitBlock> StructuralPartialEq for LE<B>
Auto Trait Implementations§
impl<B> RefUnwindSafe for LE<B>where B: RefUnwindSafe,
impl<B> Send for LE<B>where B: Send,
impl<B> Sync for LE<B>where B: Sync,
impl<B> Unpin for LE<B>where B: Unpin,
impl<B> UnwindSafe for LE<B>where B: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more