-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(poll_once)]
This is a tracking issue for Future::poll_once
, which returns the output of polling a future once.
let f = ready(1);
assert_eq!(f.poll_once().await, Poll::Ready(1));
let mut f = pending();
assert_eq!(f.poll_once().await, Poll::Pending);
Public API
trait Future {
// ...
fn poll_once(self) -> PollOnce<Self>
where
Self: Sized;
}
pub struct PollOnce<F> {
// ...
}
impl<F> Future for PollOnce<F>
where
F: Future + Unpin,
{
type Output = Poll<F::Output>;
// ...
}
Steps / History
- Implementation: Add
Future::poll_once
#92116 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- None yet.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.