Struct SelectWithStrategy

#[must_use = "streams do nothing unless polled"]
pub struct SelectWithStrategy<St1, St2, Clos, State> { /* private fields */ }

Stream for the [select_with_strategy()] function. See function docs for details.

Implementations

impl<St1, St2, Clos, State> SelectWithStrategy<St1, St2, Clos, State>

fn get_ref(&self) -> (&St1, &St2)

Acquires a reference to the underlying streams that this combinator is pulling from.

fn get_mut(&mut self) -> (&mut St1, &mut St2)

Acquires a mutable reference to the underlying streams that this combinator is pulling from.

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

fn get_pin_mut(self: Pin<&mut Self>) -> (Pin<&mut St1>, Pin<&mut St2>)

Acquires a pinned mutable reference to the underlying streams that this combinator is pulling from.

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

fn into_inner(self) -> (St1, St2)

Consumes this combinator, returning the underlying streams.

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, St1, St2, Clos, State> Unpin for SelectWithStrategy<St1, St2, Clos, State> where PinnedFieldsOf<__Origin<'__pin, St1, St2, Clos, State>>: Unpin,

impl<St1, St2, Clos, State> Debug for SelectWithStrategy<St1, St2, Clos, State> where St1: Debug, St2: Debug, State: Debug,

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

impl<St1, St2, Clos, State> FusedStream for SelectWithStrategy<St1, St2, Clos, State> where St1: Stream, St2: Stream<Item = St1::Item>, Clos: FnMut(&mut State) -> PollNext,

fn is_terminated(&self) -> bool

impl<St1, St2, Clos, State> Stream for SelectWithStrategy<St1, St2, Clos, State> where St1: Stream, St2: Stream<Item = St1::Item>, Clos: FnMut(&mut State) -> PollNext,

type Item = <St1 as Stream>::Item;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<St1::Item>>

Auto Trait Implementations

impl<St1, St2, Clos, State> Freeze for SelectWithStrategy<St1, St2, Clos, State> where St1: Freeze, St2: Freeze, State: Freeze, Clos: Freeze,

impl<St1, St2, Clos, State> RefUnwindSafe for SelectWithStrategy<St1, St2, Clos, State> where St1: RefUnwindSafe, St2: RefUnwindSafe, State: RefUnwindSafe, Clos: RefUnwindSafe,

impl<St1, St2, Clos, State> Send for SelectWithStrategy<St1, St2, Clos, State> where St1: Send, St2: Send, State: Send, Clos: Send,

impl<St1, St2, Clos, State> Sync for SelectWithStrategy<St1, St2, Clos, State> where St1: Sync, St2: Sync, State: Sync, Clos: Sync,

impl<St1, St2, Clos, State> UnsafeUnpin for SelectWithStrategy<St1, St2, Clos, State> where St1: UnsafeUnpin, St2: UnsafeUnpin, State: UnsafeUnpin, Clos: UnsafeUnpin,

impl<St1, St2, Clos, State> UnwindSafe for SelectWithStrategy<St1, St2, Clos, State> where St1: UnwindSafe, St2: UnwindSafe, State: UnwindSafe, Clos: UnwindSafe,

Blanket Implementations

impl<S> TryStreamExt for SelectWithStrategy<St1, St2, Clos, State> where S: TryStream + ?Sized,

impl<S, T, E> TryStream for SelectWithStrategy<St1, St2, Clos, State> 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 SelectWithStrategy<St1, St2, Clos, State> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for SelectWithStrategy<St1, St2, Clos, State> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for SelectWithStrategy<St1, St2, Clos, State> where T: ?Sized,

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

impl<T> From<T> for SelectWithStrategy<St1, St2, Clos, State>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> StreamExt for SelectWithStrategy<St1, St2, Clos, State> where T: Stream + ?Sized,

impl<T, U> Into<U> for SelectWithStrategy<St1, St2, Clos, State> 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 SelectWithStrategy<St1, St2, Clos, State> where U: Into<T>,

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

impl<T, U> TryInto<U> for SelectWithStrategy<St1, St2, Clos, State> where U: TryFrom<T>,

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