Struct embedded_runtime_nrf52840::yield_::YieldFuture
source · pub struct YieldFuture { /* private fields */ }Expand description
A future that must be polled once before it becomes ready; useful to cooperatively give up a timeslice to the runtime/other pending futures
Calling this function will move the currently executing future to the back of the execution queue, making room for other futures to execute. This is especially useful after running CPU-intensive operations inside a future.
Implementations§
source§impl YieldFuture
impl YieldFuture
sourcepub const fn new() -> YieldFuture ⓘ
pub const fn new() -> YieldFuture ⓘ
Creates a new yielding future
Note
This future should usually not be constructed directly, use yield_now instead.
Trait Implementations§
source§impl Debug for YieldFuture
impl Debug for YieldFuture
source§impl Future for YieldFuture
impl Future for YieldFuture
Auto Trait Implementations§
impl RefUnwindSafe for YieldFuture
impl Send for YieldFuture
impl Sync for YieldFuture
impl Unpin for YieldFuture
impl UnwindSafe for YieldFuture
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere F: Future,
§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more