Struct TryTakeWhile

#[must_use = "streams do nothing unless polled"]
pub struct TryTakeWhile<St, Fut, F>
where
    St: TryStream, { /* private fields */ }

Stream for the try_take_while method.

Implementations

impl<St, Fut, F> TryTakeWhile<St, Fut, F> where St: TryStream, F: FnMut(&St::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = St::Error>,

fn get_ref(&self) -> &St

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

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.

fn get_pin_mut(self: Pin<&mut Self>) -> 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.

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<'__pin, St, Fut, F> Unpin for TryTakeWhile<St, Fut, F> where PinnedFieldsOf<__Origin<'__pin, St, Fut, F>>: Unpin, St: TryStream,

impl<S, Fut, F, Item, E> Sink<Item> for TryTakeWhile<S, Fut, F> where S: TryStream + Sink<Item, Error = E>,

type Error = E;
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), Self::Error>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

impl<St, Fut, F> Debug for TryTakeWhile<St, Fut, F> where St: TryStream + Debug, St::Ok: Debug, Fut: Debug,

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

impl<St, Fut, F> FusedStream for TryTakeWhile<St, Fut, F> where St: TryStream + FusedStream, F: FnMut(&St::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = St::Error>,

fn is_terminated(&self) -> bool

impl<St, Fut, F> Stream for TryTakeWhile<St, Fut, F> where St: TryStream, F: FnMut(&St::Ok) -> Fut, Fut: TryFuture<Ok = bool, Error = St::Error>,

type Item = Result<<St as TryStream>::Ok, <St as TryStream>::Error>;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
fn size_hint(&self) -> (usize, Option<usize>)

Auto Trait Implementations

impl<St, Fut, F> Freeze for TryTakeWhile<St, Fut, F> where St: Freeze, F: Freeze, Option<Fut>: Freeze, Option<<St as TryStream>::Ok>: Freeze,

impl<St, Fut, F> RefUnwindSafe for TryTakeWhile<St, Fut, F> where St: RefUnwindSafe, F: RefUnwindSafe, Option<Fut>: RefUnwindSafe, Option<<St as TryStream>::Ok>: RefUnwindSafe,

impl<St, Fut, F> Send for TryTakeWhile<St, Fut, F> where St: Send, F: Send, Option<Fut>: Send, Option<<St as TryStream>::Ok>: Send,

impl<St, Fut, F> Sync for TryTakeWhile<St, Fut, F> where St: Sync, F: Sync, Option<Fut>: Sync, Option<<St as TryStream>::Ok>: Sync,

impl<St, Fut, F> UnsafeUnpin for TryTakeWhile<St, Fut, F> where St: UnsafeUnpin, F: UnsafeUnpin, Option<Fut>: UnsafeUnpin, Option<<St as TryStream>::Ok>: UnsafeUnpin,

impl<St, Fut, F> UnwindSafe for TryTakeWhile<St, Fut, F> where St: UnwindSafe, F: UnwindSafe, Option<Fut>: UnwindSafe, Option<<St as TryStream>::Ok>: UnwindSafe,

Blanket Implementations

impl<S> TryStreamExt for TryTakeWhile<St, Fut, F> where S: TryStream + ?Sized,

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

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

impl<T> Any for TryTakeWhile<St, Fut, F> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for TryTakeWhile<St, Fut, F> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for TryTakeWhile<St, Fut, F> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for TryTakeWhile<St, Fut, F>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> StreamExt for TryTakeWhile<St, Fut, F> where T: Stream + ?Sized,

impl<T, Item> SinkExt<Item> for TryTakeWhile<St, Fut, F> where T: Sink<Item> + ?Sized,

impl<T, U> Into<U> for TryTakeWhile<St, Fut, F> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for TryTakeWhile<St, Fut, F> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for TryTakeWhile<St, Fut, F> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>