[][src]Struct ccl::group::Group

pub struct Group<T> { /* fields omitted */ }

A unordered container for a group of elements. This container should be used when you want to group a lot of elements from a multithreaded context so that they then can be used in a singlethreaded context. This structure makes no guarantees about how elements are stored and in which order.

Methods

impl<T> Group<T>[src]

pub fn new() -> Self[src]

Create a new, empty group.

pub fn add(&self, element: T)[src]

Add an element to the group.

pub fn remove(&self) -> Option<T>[src]

Remove an element from the group, returning it.

pub fn add_with_guard(&self, element: T, guard: &Guard)[src]

Add an element with an existing guard.

pub fn remove_with_guard(&self, guard: &Guard) -> Option<T>[src]

Remove an element with an existing guard.

Important traits for GroupIter<'a, T>
pub fn remove_iter(&self) -> GroupIter<T>[src]

Create an iterator over all elements in the group, removing them.

Trait Implementations

impl<T> Default for Group<T>[src]

Auto Trait Implementations

impl<T> Send for Group<T> where
    T: Send + Sync

impl<T> Sync for Group<T> where
    T: Send + Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]