Struct stack_bitset::StackBitSet [−][src]
pub struct StackBitSet<const N: usize> where
[(); usize_count(N)]: Sized, { /* fields omitted */ }Expand description
BitSet with compile-time size. It does not require any allocation and is entirely stored on the stack.
The only field is an array of usize. Each element is stored in a bit
Examples
use stack_bitset::StackBitSet;
let mut a: StackBitSet<42> = StackBitSet::new();
a.set(12).unwrap();
assert!(a.get(12).unwrap());Implementations
pub fn union<const M: usize>(
&self,
other: &StackBitSet<M>
) -> StackBitSet<{ const_min(N, M) }> where
[(); usize_count(M)]: Sized,
[(); usize_count(const_min(N, M))]: Sized,
pub fn intersection<const M: usize>(
&self,
other: &StackBitSet<M>
) -> StackBitSet<{ const_min(N, M) }> where
[(); usize_count(M)]: Sized,
[(); usize_count(const_min(N, M))]: Sized,
pub fn difference<const M: usize>(
&self,
other: &StackBitSet<M>
) -> StackBitSet<{ const_min(N, M) }> where
[(); usize_count(M)]: Sized,
[(); usize_count(const_min(N, M))]: Sized,
pub fn is_subset<const M: usize>(&self, other: &StackBitSet<M>) -> bool where
[(); usize_count(M)]: Sized,
pub fn is_equal<const M: usize>(&self, other: &StackBitSet<M>) -> bool where
[(); usize_count(M)]: Sized,
pub fn is_superset<const M: usize>(&self, other: &StackBitSet<M>) -> bool where
[(); usize_count(M)]: Sized,
Trait Implementations
impl<const N: usize, const M: usize> Add<&'_ StackBitSet<M>> for StackBitSet<N> where
[(); usize_count(N)]: Sized,
[(); usize_count(M)]: Sized,
[(); usize_count(const_min(N, M))]: Sized,
impl<const N: usize, const M: usize> Add<&'_ StackBitSet<M>> for StackBitSet<N> where
[(); usize_count(N)]: Sized,
[(); usize_count(M)]: Sized,
[(); usize_count(const_min(N, M))]: Sized,
type Output = StackBitSet<{ const_min(N, M) }>
type Output = StackBitSet<{ const_min(N, M) }>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the + operator.
Performs the + operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
type Output = StackBitSet<N>
type Output = StackBitSet<N>
The resulting type after applying the - operator.
Performs the - operation. Read more
Auto Trait Implementations
impl<const N: usize> RefUnwindSafe for StackBitSet<N>
impl<const N: usize> Send for StackBitSet<N>
impl<const N: usize> Sync for StackBitSet<N>
impl<const N: usize> Unpin for StackBitSet<N>
impl<const N: usize> UnwindSafe for StackBitSet<N>
Blanket Implementations
Mutably borrows from an owned value. Read more