Skip to main content

Fiber

Trait Fiber 

Source
pub trait Fiber<'d>: Sized {
    type Output;

    // Required method
    fn poll(call: PollCall<'_, '_, 'd, Self>) -> Poll<Self::Output>;
}
Expand description

A pinned unit of cooperative work admitted by its live owner and driver. Ready ends polling; the owning task drops this fiber before exposing its output. Task retains standalone completion; nested polls share admission and budget.

Required Associated Types§

Required Methods§

Source

fn poll(call: PollCall<'_, '_, 'd, Self>) -> Poll<Self::Output>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'d, F: Fiber<'d>> Fiber<'d> for Pin<&mut Task<F>>

Source§

type Output = <F as Fiber<'d>>::Output

Source§

fn poll(call: PollCall<'_, '_, 'd, Self>) -> Poll<Self::Output>

Source§

impl<'d> Fiber<'d> for Infallible

Source§

type Output = !

Source§

fn poll(call: PollCall<'_, '_, 'd, Self>) -> Poll<Self::Output>

Implementors§

Source§

impl<'d, F, T> Fiber<'d> for PollFn<'d, F>
where F: FnMut(Admission<'_, '_, 'd>) -> Poll<T>,

Source§

impl<'d, F, const N: usize> Fiber<'d> for dope_core::executor::task::batch::Join<'_, 'd, F, N>
where F: Fiber<'d>,

Source§

type Output = Result<IntoIter<<F as Fiber<'d>>::Output, N>, Error>

Source§

impl<'d, L, R> Fiber<'d> for dope_core::executor::task::Join<'d, L, R>
where L: Fiber<'d>, R: Fiber<'d>,

Source§

type Output = (<L as Fiber<'d>>::Output, <R as Fiber<'d>>::Output)

Source§

impl<'d, L, R> Fiber<'d> for Race<L, R>
where L: Fiber<'d>, R: Fiber<'d>,

Source§

type Output = Either<<L as Fiber<'d>>::Output, <R as Fiber<'d>>::Output>

Source§

impl<'d, T> Fiber<'d> for Ready<T>

Source§

impl<'d> Fiber<'d> for &mut Wait<'_, 'd>

Source§

impl<'d> Fiber<'d> for Now

Source§

impl<'d> Fiber<'d> for Sleep<'d, Deadline<'d>>

Source§

impl<'d> Fiber<'d> for Sleep<'d>