pub struct SetU32(_);
Expand description
A set of u32
Implementations
sourceimpl SetU32
impl SetU32
sourcepub fn with_capacity_of(other: &Self) -> Self
pub fn with_capacity_of(other: &Self) -> Self
Create an empty set with capacity to hold the provided set.
use tinyset::SetU32;
let a: SetU32 = (1..300).collect();
let mut b = SetU32::with_capacity_of(&a);
assert_eq!(a.capacity(), b.capacity());
assert_eq!(b.len(), 0);
for i in a.iter() {
b.insert(i);
}
assert_eq!(a.capacity(), b.capacity());
assert_eq!(b.len(), a.len());
Trait Implementations
sourceimpl<'b> BitOr<&'b SetU32> for SetU32
impl<'b> BitOr<&'b SetU32> for SetU32
sourceimpl FromIterator<u32> for SetU32
impl FromIterator<u32> for SetU32
sourcefn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = u32>,
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = u32>,
Creates a value from an iterator. Read more
sourceimpl IntoIterator for SetU32
impl IntoIterator for SetU32
sourceimpl<'a, 'b> Sub<&'b SetU32> for &'a SetU32
impl<'a, 'b> Sub<&'b SetU32> for &'a SetU32
sourceimpl<'b> Sub<&'b SetU32> for SetU32
impl<'b> Sub<&'b SetU32> for SetU32
impl Eq for SetU32
impl Send for SetU32
impl Sync for SetU32
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more