Struct BlockingWrap

Source
pub struct BlockingWrap<R: BlockingRbRef, const P: bool, const C: bool> { /* private fields */ }

Implementations§

Source§

impl<R: BlockingRbRef> BlockingWrap<R, false, true>

Source

pub fn is_closed(&self) -> bool

Source

pub fn set_timeout(&mut self, timeout: Option<Duration>)

Source

pub fn timeout(&self) -> Option<Duration>

Source

pub fn wait_occupied(&mut self, count: usize) -> Result<(), WaitError>

Source

pub fn pop(&mut self) -> Result<<Self as Observer>::Item, WaitError>

Source

pub fn pop_all_iter(&mut self) -> PopAllIter<'_, R>

Source§

impl<R: BlockingRbRef> BlockingWrap<R, false, true>
where <Self as Observer>::Item: Copy,

Source

pub fn pop_exact(&mut self, slice: &mut [<Self as Observer>::Item]) -> usize

Source

pub fn pop_until_end(&mut self, vec: &mut Vec<<Self as Observer>::Item>)

Source§

impl<R: BlockingRbRef> BlockingWrap<R, true, false>

Source

pub fn is_closed(&self) -> bool

Source

pub fn set_timeout(&mut self, timeout: Option<Duration>)

Source

pub fn timeout(&self) -> Option<Duration>

Source

pub fn wait_vacant(&mut self, count: usize) -> Result<(), WaitError>

Source

pub fn push( &mut self, item: <Self as Observer>::Item, ) -> Result<(), (WaitError, <Self as Observer>::Item)>

Source

pub fn push_all_iter<I: Iterator<Item = <Self as Observer>::Item>>( &mut self, iter: I, ) -> usize

Source§

impl<R: BlockingRbRef> BlockingWrap<R, true, false>
where <Self as Observer>::Item: Copy,

Source

pub fn push_exact(&mut self, slice: &[<Self as Observer>::Item]) -> usize

Source§

impl<R: BlockingRbRef, const P: bool, const C: bool> BlockingWrap<R, P, C>

Source

pub fn new(rb: R) -> Self

Source

pub fn observe(&self) -> Obs<R>

Trait Implementations§

Source§

impl<R: BlockingRbRef, const P: bool, const C: bool> AsMut<BlockingWrap<R, P, C>> for BlockingWrap<R, P, C>

Source§

fn as_mut(&mut self) -> &mut Self

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<R: BlockingRbRef, const P: bool, const C: bool> AsRef<BlockingWrap<R, P, C>> for BlockingWrap<R, P, C>

Source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<R: BlockingRbRef, const P: bool, const C: bool> Based for BlockingWrap<R, P, C>

Source§

type Base = Caching<R, P, C>

Type the wrapper based on.
Source§

fn base(&self) -> &Self::Base

Reference to base.
Source§

fn base_mut(&mut self) -> &mut Self::Base

Mutable reference to base.
Source§

impl<R: BlockingRbRef, const P: bool, const C: bool> Wrap for BlockingWrap<R, P, C>

Source§

type RbRef = R

Ring buffer reference type.
Source§

fn rb_ref(&self) -> &Self::RbRef

Underlying ring buffer reference.
Source§

fn into_rb_ref(self) -> Self::RbRef

Destructure into underlying ring buffer reference.
Source§

fn rb(&self) -> &<Self::RbRef as RbRef>::Rb

Underlying ring buffer.

Auto Trait Implementations§

§

impl<R, const P: bool, const C: bool> !Freeze for BlockingWrap<R, P, C>

§

impl<R, const P: bool, const C: bool> !RefUnwindSafe for BlockingWrap<R, P, C>

§

impl<R, const P: bool, const C: bool> Send for BlockingWrap<R, P, C>
where R: Send,

§

impl<R, const P: bool, const C: bool> !Sync for BlockingWrap<R, P, C>

§

impl<R, const P: bool, const C: bool> Unpin for BlockingWrap<R, P, C>
where R: Unpin,

§

impl<R, const P: bool, const C: bool> UnwindSafe for BlockingWrap<R, P, C>
where R: 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.