Struct Any

Source
pub struct Any<'a, S: ?Sized, F> { /* private fields */ }
Expand description

Trait Implementations§

Source§

impl<S, F> CompletionFuture for Any<'_, S, F>
where S: CompletionStream + Unpin + ?Sized, F: FnMut(S::Item) -> bool,

Source§

type Output = bool

The type of value produced on completion.
Source§

unsafe fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

unsafe fn poll_cancel(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()>

Attempt to cancel the future, registering the current task for wakeup if has not finished cancelling yet. Read more
Source§

impl<'a, S: Debug + ?Sized, F: Debug> Debug for Any<'a, S, F>

Source§

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

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

impl<S, F> Future for Any<'_, S, F>
where S: CompletionStream + Stream<Item = <S as CompletionStream>::Item> + Unpin + ?Sized, F: FnMut(<S as CompletionStream>::Item) -> bool,

Source§

type Output = bool

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

impl<S: Unpin + ?Sized, F> Unpin for Any<'_, S, F>

Auto Trait Implementations§

§

impl<'a, S, F> Freeze for Any<'a, S, F>
where F: Freeze, S: ?Sized,

§

impl<'a, S, F> RefUnwindSafe for Any<'a, S, F>

§

impl<'a, S, F> Send for Any<'a, S, F>
where F: Send, S: Send + ?Sized,

§

impl<'a, S, F> Sync for Any<'a, S, F>
where F: Sync, S: Sync + ?Sized,

§

impl<'a, S, F> !UnwindSafe for Any<'a, S, F>

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> CompletionFutureExt for T
where T: CompletionFuture + ?Sized,

Source§

unsafe fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where Self: Unpin,

A convenience for calling CompletionFuture::poll on Unpin futures. Read more
Source§

unsafe fn poll_cancel(&mut self, cx: &mut Context<'_>) -> Poll<()>
where Self: Unpin,

A convenience for calling CompletionFuture::poll_cancel on Unpin futures. Read more
Source§

fn must_complete(self) -> MustComplete<Self>
where Self: Sized,

Make sure that the future will complete. Any requests to cancel the future through poll_cancel will be ignored.
Source§

fn now_or_never(self) -> NowOrNever<Self>
where Self: Sized,

Get the future’s output if it’s ready, or cancel it if it’s not. Read more
Source§

fn catch_unwind(self) -> CatchUnwind<Self>
where Self: Sized + UnwindSafe,

Available on crate feature std only.
Catch panics in the future. Read more
Source§

fn boxed<'a>(self) -> BoxCompletionFuture<'a, Self::Output>
where Self: Sized + Send + 'a,

Available on crate feature alloc only.
Box the future, erasing its type. Read more
Source§

fn boxed_local<'a>(self) -> LocalBoxCompletionFuture<'a, Self::Output>
where Self: Sized + 'a,

Available on crate feature alloc only.
Box the future locally, erasing its type. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T
where T: Future,

Source§

fn into_completion(self) -> Adapter<Self>

Convert this future into a CompletionFuture. Read more
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<F> IntoFuture for F
where F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. 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.