WithQueuedVecInner

Trait WithQueuedVecInner 

Source
pub trait WithQueuedVecInner<A: 'static, T: 'static, const N: usize> {
    // Required method
    fn with_queued_vec_inner<F, O>(&self, operation: F) -> O
       where F: FnOnce(&mut QueuedVecInner<A, T, N>) -> O;

    // Provided methods
    fn push<'a>(&'a self, item: T) -> PushFuture<'a, Self, A, T, N>  { ... }
    fn try_push(&self, item: T) -> Result<(), T> { ... }
    fn operate<F, O>(&self, operation: F) -> O
       where F: FnOnce(&mut Vec<T, N>) -> O { ... }
    fn retain<F>(&self, f: F)
       where F: FnMut(&T) -> bool { ... }
}

Required Methods§

Source

fn with_queued_vec_inner<F, O>(&self, operation: F) -> O
where F: FnOnce(&mut QueuedVecInner<A, T, N>) -> O,

Provided Methods§

Source

fn push<'a>(&'a self, item: T) -> PushFuture<'a, Self, A, T, N>

Pushes an item to the vec. Waits until there is space.

Source

fn try_push(&self, item: T) -> Result<(), T>

Source

fn operate<F, O>(&self, operation: F) -> O
where F: FnOnce(&mut Vec<T, N>) -> O,

Perfroms an operation synchronously on the contained elements and returns the result.

Source

fn retain<F>(&self, f: F)
where F: FnMut(&T) -> bool,

Retains only the elemnts matching [f]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R: RawMutex, T: 'static, const N: usize> WithQueuedVecInner<(), T, N> for QueuedVec<R, T, N>