wiki/content/20201120110842-pending.md

37 lines
516 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
id: 048ee80a-c058-4a41-8087-9ce3649302ba
title: pending
---
# Description
pending[^1] creates a future which never resovles, representing a
computation that never finishes.
# Declaration
``` rust
pub fn pending<T>() -> Pending<T>
```
# Notable traits
``` rust
impl<T> Future for Pending<T>
type Output = T;
```
# Examples
``` rust
use core::future;
let future = future::pending();
let () = future.await;
unreachable!();
```
# Footnotes
[^1]: <https://doc.rust-lang.org/std/future/fn.pending.html>