Skip to main content

Unbounded

Struct Unbounded 

Source
pub struct Unbounded<T>(/* private fields */);
Expand description

Keeps every item, in order. This is what into_stream uses.

Nothing is ever dropped, so a source faster than the consumer grows the buffer without bound.

Implementations§

Source§

impl<T> Unbounded<T>

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl<T> Debug for Unbounded<T>
where VecDeque<T>: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Default for Unbounded<T>
where VecDeque<T>: Default,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T> StreamBuffer<T> for Unbounded<T>

Source§

type Item = T

What the stream yields.
Source§

fn push(&mut self, item: T) -> Option<T>

Stores an item the source pushed. Read more
Source§

fn pop(&mut self) -> Option<T>

Takes the next item to yield, or None when the stream has to wait for the source.

Auto Trait Implementations§

§

impl<T> Freeze for Unbounded<T>
where VecDeque<T>: Freeze,

§

impl<T> RefUnwindSafe for Unbounded<T>

§

impl<T> Send for Unbounded<T>
where VecDeque<T>: Send,

§

impl<T> Sync for Unbounded<T>
where VecDeque<T>: Sync,

§

impl<T> Unpin for Unbounded<T>
where VecDeque<T>: Unpin,

§

impl<T> UnsafeUnpin for Unbounded<T>

§

impl<T> UnwindSafe for Unbounded<T>
where VecDeque<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> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSync for T
where T: Sync,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.