QueuedVec

Struct QueuedVec 

Source
pub struct QueuedVec<R: RawMutex, T: 'static, const N: usize> { /* private fields */ }

Implementations§

Source§

impl<R: RawMutex, T: 'static, const N: usize> QueuedVec<R, T, N>

Source

pub fn new() -> Self

Source

pub fn remove<'a, F: FnMut(&T) -> bool>( &'a self, remove_where: F, ) -> RemoveIterator<'a, R, T, F, N>

Remove all elements from the queue which satisfy the remove_where function. Every call to next on the returned iterator removes one element and returns it if present

Trait Implementations§

Source§

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

Source§

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

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]

Auto Trait Implementations§

§

impl<R, T, const N: usize> !Freeze for QueuedVec<R, T, N>

§

impl<R, T, const N: usize> !RefUnwindSafe for QueuedVec<R, T, N>

§

impl<R, T, const N: usize> Send for QueuedVec<R, T, N>
where R: Send, T: Send,

§

impl<R, T, const N: usize> Sync for QueuedVec<R, T, N>
where R: Sync, T: Send,

§

impl<R, T, const N: usize> Unpin for QueuedVec<R, T, N>
where R: Unpin, T: Unpin,

§

impl<R, T, const N: usize> UnwindSafe for QueuedVec<R, T, N>
where R: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.