pub struct MapState<S, F> { /* private fields */ }Expand description
A stream which applies a transform to the state of a stream.
Trait Implementations§
Source§impl<S, F, B> StateStream for MapState<S, F>
impl<S, F, B> StateStream for MapState<S, F>
Source§type Item = <S as StateStream>::Item
type Item = <S as StateStream>::Item
The items being streamed.
Source§type Error = <S as StateStream>::Error
type Error = <S as StateStream>::Error
The error returned.
Source§fn poll(&mut self) -> Poll<StreamEvent<S::Item, B>, (S::Error, B)>
fn poll(&mut self) -> Poll<StreamEvent<S::Item, B>, (S::Error, B)>
Similar to
Stream::poll. Read moreSource§fn into_future(self) -> IntoFuture<Self>where
Self: Sized,
fn into_future(self) -> IntoFuture<Self>where
Self: Sized,
Returns a future which yields the next element of the stream.
Source§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
Returns a normal
Stream which yields the elements of this stream and discards the state.Source§fn map<F, B>(self, f: F) -> Map<Self, F>
fn map<F, B>(self, f: F) -> Map<Self, F>
Returns a stream which applies a transform to items of this stream.
Source§fn map_err<F, B>(self, f: F) -> MapErr<Self, F>
fn map_err<F, B>(self, f: F) -> MapErr<Self, F>
Returns a stream which applies a transform to errors of this stream.
Source§fn map_state<F, B>(self, f: F) -> MapState<Self, F>
fn map_state<F, B>(self, f: F) -> MapState<Self, F>
Returns a stream which applies a transform to the state of this stream.
Source§fn filter<F>(self, f: F) -> Filter<Self, F>
fn filter<F>(self, f: F) -> Filter<Self, F>
Returns a stream which filters items of this stream by a predicate.
Source§fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F>
fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F>
Returns a stream which filters and transforms items of this stream by a predicate.
Auto Trait Implementations§
impl<S, F> Freeze for MapState<S, F>
impl<S, F> RefUnwindSafe for MapState<S, F>
impl<S, F> Send for MapState<S, F>
impl<S, F> Sync for MapState<S, F>
impl<S, F> Unpin for MapState<S, F>
impl<S, F> UnsafeUnpin for MapState<S, F>
impl<S, F> UnwindSafe for MapState<S, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more