Struct smallbitset::Set8 [−][src]
This structure encapsulates a small allocation free set of integers. Because it is implemented as a fixed size bitset, it can only accomodate values in the range 0..$capa.
Because of this restriction on the range of allowed values, all the items that can be stored in this set are of type ‘u8’.
Implementations
impl Set8
[src]
pub fn empty() -> Self
[src]
This method creates an empty set
pub fn full() -> Self
[src]
This method returns the complete set
pub fn singleton(x: u8) -> Self
[src]
This method creates a singleton set holding the single value ‘x’.
pub fn union(self, other: Self) -> Self
[src]
This method returns the union of two sets
pub fn inter(self, other: Self) -> Self
[src]
This method returns the intersection of two sets
pub fn diff(self, other: Self) -> Self
[src]
This method returns the difference of two sets.
pub fn complement(self) -> Self
[src]
This method retuns the complement of the current set
pub fn insert(&mut self, x: u8) -> Self
[src]
This method returns the set obtained by adding the singleton x to the current set
pub fn remove(self, x: u8) -> Self
[src]
This method returns the set obtained by removing the singleton x from the current set
pub fn is_empty(self) -> bool
[src]
Returns true iff the set is empty
pub fn len(self) -> usize
[src]
Returns the number of items in this set
pub fn contains(self, x: u8) -> bool
[src]
Returns true iff the current set contains the given item x
pub const fn capacity(self) -> usize
[src]
Returns the capcity of this set
pub fn iter(self) -> Set8Iterⓘ
[src]
Returns an iterator over the elements of this set
Trait Implementations
impl Clone for Set8
[src]
impl Copy for Set8
[src]
impl Debug for Set8
[src]
impl Default for Set8
[src]
impl Display for Set8
[src]
impl Eq for Set8
[src]
impl From<u8> for Set8
[src]
impl Hash for Set8
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl IntoIterator for Set8
[src]
type Item = u8
The type of the elements being iterated over.
type IntoIter = Set8Iter
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl PartialEq<Set8> for Set8
[src]
impl StructuralEq for Set8
[src]
impl StructuralPartialEq for Set8
[src]
Auto Trait Implementations
impl RefUnwindSafe for Set8
impl Send for Set8
impl Sync for Set8
impl Unpin for Set8
impl UnwindSafe for Set8
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,