Type Alias AvcCommandStream

Source
pub type AvcCommandStream = FilterMap<CommandStream, Ready<Option<Result<Command, Error>>>, fn(Result<Command, Error>) -> Ready<Option<Result<Command, Error>>>>;

Aliased Type§

struct AvcCommandStream { /* private fields */ }

Implementations

§

impl<St, Fut, F> FilterMap<St, Fut, F>
where St: Stream, F: FnMut(<St as Stream>::Item) -> Fut, Fut: Future,

pub fn get_ref(&self) -> &St

Acquires a reference to the underlying sink or stream that this combinator is pulling from.

pub fn get_mut(&mut self) -> &mut St

Acquires a mutable reference to the underlying sink or stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.

pub fn get_pin_mut(self: Pin<&mut FilterMap<St, Fut, F>>) -> Pin<&mut St>

Acquires a pinned mutable reference to the underlying sink or stream that this combinator is pulling from.

Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.

pub fn into_inner(self) -> St

Consumes this combinator, returning the underlying sink or stream.

Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.

Trait Implementations

§

impl<St, Fut, F> Debug for FilterMap<St, Fut, F>
where St: Debug, Fut: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<St, Fut, F, T> FusedStream for FilterMap<St, Fut, F>
where St: Stream + FusedStream, F: FnMut1<<St as Stream>::Item, Output = Fut>, Fut: Future<Output = Option<T>>,

§

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.
§

impl<S, Fut, F, Item> Sink<Item> for FilterMap<S, Fut, F>
where S: Stream + Sink<Item>, F: FnMut1<<S as Stream>::Item, Output = Fut>, Fut: Future,

§

type Error = <S as Sink<Item>>::Error

The type of value produced by the sink when an error occurs.
§

fn poll_ready( self: Pin<&mut FilterMap<S, Fut, F>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <FilterMap<S, Fut, F> as Sink<Item>>::Error>>

Attempts to prepare the Sink to receive a value. Read more
§

fn start_send( self: Pin<&mut FilterMap<S, Fut, F>>, item: Item, ) -> Result<(), <FilterMap<S, Fut, F> as Sink<Item>>::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
§

fn poll_flush( self: Pin<&mut FilterMap<S, Fut, F>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <FilterMap<S, Fut, F> as Sink<Item>>::Error>>

Flush any remaining output from this sink. Read more
§

fn poll_close( self: Pin<&mut FilterMap<S, Fut, F>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <FilterMap<S, Fut, F> as Sink<Item>>::Error>>

Flush any remaining output and close this sink, if necessary. Read more
§

impl<St, Fut, F, T> Stream for FilterMap<St, Fut, F>
where St: Stream, F: FnMut1<<St as Stream>::Item, Output = Fut>, Fut: Future<Output = Option<T>>,

§

type Item = T

Values yielded by the stream.
§

fn poll_next( self: Pin<&mut FilterMap<St, Fut, F>>, cx: &mut Context<'_>, ) -> Poll<Option<T>>

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
§

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

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

impl<'__pin, St, Fut, F> Unpin for FilterMap<St, Fut, F>
where __Origin<'__pin, St, Fut, F>: Unpin,