pub struct Byteset<const N: usize>(/* private fields */);Expand description
Bitset of variable size.
N is size in bytes of the Byteset.
Implementations§
Trait Implementations§
Source§impl<const N: usize> BitAndAssign for Byteset<N>
impl<const N: usize> BitAndAssign for Byteset<N>
Source§fn bitand_assign(&mut self, rhs: Byteset<N>)
fn bitand_assign(&mut self, rhs: Byteset<N>)
Performs the
&= operation. Read moreSource§impl<const N: usize> BitOrAssign for Byteset<N>
impl<const N: usize> BitOrAssign for Byteset<N>
Source§fn bitor_assign(&mut self, rhs: Byteset<N>)
fn bitor_assign(&mut self, rhs: Byteset<N>)
Performs the
|= operation. Read moreSource§impl<const N: usize> BitXorAssign for Byteset<N>
impl<const N: usize> BitXorAssign for Byteset<N>
Source§fn bitxor_assign(&mut self, rhs: Byteset<N>)
fn bitxor_assign(&mut self, rhs: Byteset<N>)
Performs the
^= operation. Read moreimpl<const N: usize> Eq for Byteset<N>
Source§impl<const N: usize> LeftAligned for Byteset<N>
impl<const N: usize> LeftAligned for Byteset<N>
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<const N: usize> Ord for Byteset<N>
impl<const N: usize> Ord for Byteset<N>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<const N: usize> PartialEq for Byteset<N>
impl<const N: usize> PartialEq for Byteset<N>
Source§impl<const N: usize> PartialOrd for Byteset<N>
impl<const N: usize> PartialOrd for Byteset<N>
impl<const N: usize> StructuralPartialEq for Byteset<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Byteset<N>
impl<const N: usize> RefUnwindSafe for Byteset<N>
impl<const N: usize> Send for Byteset<N>
impl<const N: usize> Sync for Byteset<N>
impl<const N: usize> Unpin for Byteset<N>
impl<const N: usize> UnsafeUnpin for Byteset<N>
impl<const N: usize> UnwindSafe for Byteset<N>
Blanket Implementations§
Source§impl<T> Bitset for T
impl<T> Bitset for T
Source§const BYTE_SIZE: usize = Self::_BYTE_SIZE
const BYTE_SIZE: usize = Self::_BYTE_SIZE
Number of bytes (
size in bytes) of the bitset part. 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) -> Res
fn combine_optimized<Other, Res>(self, other: Other) -> Res
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)
fn split_optimized<Res1, Res2>(self) -> (Res1, Res2)
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