pub struct Bitset8(/* private fields */);Expand description
Bitset of bit size 8.
Implementations§
Trait Implementations§
Source§impl BitAndAssign for Bitset8
impl BitAndAssign for Bitset8
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign for Bitset8
impl BitOrAssign for Bitset8
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign for Bitset8
impl BitXorAssign for Bitset8
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl FromIterator<Bit> for Bitset8
impl FromIterator<Bit> for Bitset8
Source§impl LeftAligned for Bitset8
impl LeftAligned for Bitset8
Source§fn shift_left(self, amount: Index<Self>) -> Self
fn shift_left(self, amount: Index<Self>) -> Self
Shifts bit representation of the
Bitset left by amount.
Has signature and use identical to core::ops::Shl<Index<Self>>.Source§fn shift_right(self, amount: Index<Self>) -> Self
fn shift_right(self, amount: Index<Self>) -> Self
Shifts bit representation of the
Bitset right by amount.
Has signature and use identical to core::ops::Shr<Index<Self>>.Source§impl Ord for Bitset8
impl Ord for Bitset8
Source§impl PartialOrd for Bitset8
impl PartialOrd for Bitset8
impl Copy for Bitset8
impl Eq for Bitset8
impl StructuralPartialEq for Bitset8
Auto Trait Implementations§
impl Freeze for Bitset8
impl RefUnwindSafe for Bitset8
impl Send for Bitset8
impl Sync for Bitset8
impl Unpin for Bitset8
impl UnwindSafe for Bitset8
Blanket Implementations§
Source§impl<T> Bitset for T
impl<T> Bitset for T
Source§const BYTE_SIZE: usize = const BYTE_SIZE: usize = Self::_BYTE_SIZE;
const BYTE_SIZE: usize = const BYTE_SIZE: usize = Self::_BYTE_SIZE;
Number of bytes (
size in bytes) of the bitset part. Read moreSource§const NONE: T = const NONE: Self = Self::_NONE;
const NONE: T = const NONE: Self = Self::_NONE;
Value of the
Bitset with every bit not set. Read moreSource§const ALL: T = const ALL: Self = Self::_ALL;
const ALL: T = const ALL: Self = Self::_ALL;
Value of the
Bitset with every bit set. Read moreSource§type Repr = <T as LeftAligned>::_Repr
type Repr = <T as LeftAligned>::_Repr
Type, that is the underlying representation of the
Usually one of the Rust built-in types, but can be another
Bitset.Usually one of the Rust built-in types, but can be another
Bitset or even Self.Source§type Size = <T as LeftAligned>::_Size
type Size = <T as LeftAligned>::_Size
Marker type representing size ordering. Used for compile time checks on some methods.
Source§fn from_index(index: &Index<T>) -> T
fn from_index(index: &Index<T>) -> T
Source§fn count_ones(&self) -> usize
fn count_ones(&self) -> usize
Returns the count of all set bits. Read more
Source§fn count_zeros(&self) -> usize
fn count_zeros(&self) -> usize
Returns the number of all unset bits. Read more
Source§fn complement(self) -> T
fn complement(self) -> T
Source§fn intersection(self, other: T) -> T
fn intersection(self, other: T) -> T
Source§fn difference(self, other: T) -> T
fn difference(self, other: T) -> T
Source§fn sym_difference(self, other: T) -> T
fn sym_difference(self, other: T) -> T
Source§fn intersects(&self, other: &T) -> bool
fn intersects(&self, other: &T) -> bool
Source§fn expand<Res>(self) -> Res
fn expand<Res>(self) -> Res
Expands
If available, you should prefer using
Bitset to a bigger one.If available, you should prefer using
Bitset::expand_optimized. Read moreSource§fn expand_optimized<Res>(self) -> Res
fn expand_optimized<Res>(self) -> Res
Source§fn from_iterable<'a, I>(iterable: I) -> Selfwhere
Self: 'a,
I: IntoIterator<Item = &'a Bit>,
fn from_iterable<'a, I>(iterable: I) -> Selfwhere
Self: 'a,
I: IntoIterator<Item = &'a Bit>,
Source§fn combine<Other, Res>(self, other: Other) -> Res
fn combine<Other, Res>(self, other: Other) -> Res
Combines two
If available, you should prefer using
Bitsets to create a bigger one.If available, you should prefer using
Bitset::combine_optimized. Read moreSource§fn combine_optimized<Other, Res>(self, other: Other) -> Reswhere
Self: LeftAligned,
Other: Bitset + LeftAligned,
Res: Bitset + LeftAligned,
Self::Size: Combines<Other::Size, Res::Size> + Smaller<Res::Size>,
Other::Size: Smaller<Res::Size>,
fn combine_optimized<Other, Res>(self, other: Other) -> Reswhere
Self: LeftAligned,
Other: Bitset + LeftAligned,
Res: Bitset + LeftAligned,
Self::Size: Combines<Other::Size, Res::Size> + Smaller<Res::Size>,
Other::Size: Smaller<Res::Size>,
Source§fn split<Res1, Res2>(self) -> (Res1, Res2)
fn split<Res1, Res2>(self) -> (Res1, Res2)
Splits
If available, you should prefer using
Bitset into two smaller ones.If available, you should prefer using
Bitset::split_optimized. Read moreSource§fn split_optimized<Res1, Res2>(self) -> (Res1, Res2)where
Self: LeftAligned,
Res1: Bitset + LeftAligned,
Res2: Bitset + LeftAligned,
Self::Size: Splits<Res1::Size, Res2::Size>,
Res1::Size: Smaller<Self::Size>,
Res2::Size: Smaller<Self::Size>,
fn split_optimized<Res1, Res2>(self) -> (Res1, Res2)where
Self: LeftAligned,
Res1: Bitset + LeftAligned,
Res2: Bitset + LeftAligned,
Self::Size: Splits<Res1::Size, Res2::Size>,
Res1::Size: Smaller<Self::Size>,
Res2::Size: Smaller<Self::Size>,
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