Struct EventStream

Source
pub struct EventStream<T> { /* private fields */ }
Expand description

A stream of events

Trait Implementations§

Source§

impl<T> Debug for EventStream<T>

Source§

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

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

impl<T> Stream for EventStream<T>

Source§

type Item = T

Values yielded by the stream.
Source§

fn poll_next( self: Pin<&mut Self>, ctx: &mut Context<'_>, ) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<'__pin, T> Unpin for EventStream<T>
where __Origin<'__pin, T>: Unpin,

Auto Trait Implementations§

§

impl<T> Freeze for EventStream<T>

§

impl<T> RefUnwindSafe for EventStream<T>

§

impl<T> Send for EventStream<T>
where T: Send,

§

impl<T> Sync for EventStream<T>
where T: Send,

§

impl<T> UnwindSafe for EventStream<T>

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<S> StreamExt for S
where S: Stream + ?Sized,

Source§

fn next(&mut self) -> NextFuture<'_, Self>
where Self: Unpin,

Retrieves the next item in the stream. Read more
Source§

fn count(self) -> CountFuture<Self>
where Self: Sized,

Counts the number of elements in the stream. Read more
Source§

fn map<T, F>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> T,

Maps items of the stream to new values using a closure. Read more
Source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Keeps items of the stream for which predicate returns true. Read more
Source§

fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> Option<T>,

Filters and maps items of the stream using a closure. Read more
Source§

fn collect<C>(self) -> CollectFuture<Self, C>
where C: Default + Extend<Self::Item>, Self: Sized,

Collects all items in the stream into a collection. Read more
Source§

fn try_collect<T, C>(self) -> TryCollectFuture<Self, C>
where C: Default + Extend<T>, Self: Sized, Self::Item: Result<Ok = T>,

Collects all items in the fallible stream into a collection. Read more
Source§

fn fold<T, F>(self, init: T, f: F) -> FoldFuture<Self, F, T>
where Self: Sized, F: FnMut(T, Self::Item) -> T,

Accumulates a computation over the stream. Read more
Source§

fn try_fold<T, E, F, B>( &mut self, init: B, f: F, ) -> TryFoldFuture<'_, Self, F, B>
where Self: Sized + Unpin, Self::Item: Result<Ok = T, Err = E>, F: FnMut(B, T) -> Result<B, E>,

Accumulates a fallible computation over the stream. Read more
Source§

fn boxed(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send>>
where Self: Sized + Send + 'static,

Boxes the stream and changes its type to dyn Stream<Item = T> + Send. Read more
Source§

fn boxed_local(self) -> Pin<Box<dyn Stream<Item = Self::Item>>>
where Self: Sized + 'static,

Boxes the stream and changes its type to dyn Stream<Item = T>. Read more
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.
Source§

impl<S, T, E> TryStream for S
where S: Stream<Item = Result<T, E>> + ?Sized,

Source§

type Ok = T

The type of successful values yielded by this future
Source§

type Error = E

The type of failures yielded by this future
Source§

fn try_poll_next( self: Pin<&mut S>, cx: &mut Context<'_>, ) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>

Poll this TryStream as if it were a Stream. Read more