pending

Description

pending[fn:documentation] creates a future which never resovles, representing a computation that never finishes.

Declaration

pub fn pending() -> Pending

Notable traits

impl Future for Pending
type Output = T;

Examples

use core::future;

let future = future::pending();
let () = future.await;
unreachable!();

Footnotes

[fn:documentation]https://doc.rust-lang.org/std/future/fn.pending.html