pub struct AtomicVec<T> { /* private fields */ }Implementations§
Source§impl<T> AtomicVec<T>
impl<T> AtomicVec<T>
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
pub fn init_with<F: FnMut() -> T>(cap: usize, init: F) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn push(&self, value: T)
pub fn push_batch<I: IntoIterator<Item = T>>(&self, iter: I)
pub fn pop(&self) -> Option<T>
pub fn pop_batch(&self, count: usize) -> Vec<T>
pub fn drain(&self) -> Vec<T>
pub fn reset_with(&self, cap: usize, init: impl FnMut() -> T) -> usize
pub fn as_vec(&self) -> Vec<T>
Source§impl<T> AtomicVec<T>
impl<T> AtomicVec<T>
pub fn find<F>(&self, predicate: F) -> Option<T>
pub fn for_each<F>(&self, f: F)
pub fn fold<B, F>(&self, init: B, f: F) -> B
pub fn reduce<F>(&self, f: F) -> Option<T>
pub fn get(&self, index: usize) -> Option<T>where
T: Clone,
pub fn swap(&self, i: usize, j: usize) -> bool
pub fn remove(&self, index: usize) -> Option<T>
pub fn reverse(&self)
Trait Implementations§
Source§impl<T> FromIterator<T> for AtomicVec<T>
impl<T> FromIterator<T> for AtomicVec<T>
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
impl<T: Send> Send for AtomicVec<T>
impl<T: Send> Sync for AtomicVec<T>
Auto Trait Implementations§
impl<T> Freeze for AtomicVec<T>
impl<T> RefUnwindSafe for AtomicVec<T>
impl<T> Unpin for AtomicVec<T>
impl<T> UnsafeUnpin for AtomicVec<T>
impl<T> UnwindSafe for AtomicVec<T>
Blanket Implementations§
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