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 that owner’s polling authority; implementations do not duplicate it. 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> for Pin<&mut Task<F>>
where F: Fiber<'d>,

Source§

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

Source§

fn poll( call: PollCall<'_, '_, 'd, Pin<&mut Task<F>>>, ) -> Poll<<Pin<&mut Task<F>> as Fiber<'d>>::Output>

Implementors§

Source§

impl<'d, F, R> Fiber<'d> for Once<'d, F, R>
where F: for<'a> FnOnce(Access<'a, Identity<'d>>) -> R,

Source§

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

Source§

impl<'d, F> Fiber<'d> for Owned<F>
where F: Resume<'d>,

Source§

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

Source§

impl<'d, F> Fiber<'d> for Task<F>
where F: Fiber<'d>,

Source§

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

Source§

impl<'d, L, R> Fiber<'d> for dope_fiber::abi::join::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 Pending<T>

Source§

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

Source§

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

Source§

impl<'d> Fiber<'d> for Operation<'_, 'd>

Source§

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

Source§

impl<'pool, 'd, F, const N: usize> Fiber<'d> for dope_fiber::task::batch::join::Join<'pool, 'd, F, N>
where F: Fiber<'d>,

Source§

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

Source§

impl<'s, 'arena, 'credits, 'region, D, X, E, K> Fiber<'region> for Response<'s, 'arena, 'credits, 'region, D, X, E, K>
where X: Extract<'s, 'arena, 'credits, 'region, D, E>,

Source§

type Output = <X as Extract<'s, 'arena, 'credits, 'region, D, E>>::Output

Source§

impl<'scope, 'w, 'd, T, W, ID> Fiber<'d> for Connect<'scope, 'w, 'd, T, W, ID>
where 'd: 'w, T: Transport, W: Spec, ID: Identity,

Source§

type Output = Result<Io<'scope, 'w, 'd, W, Id<'d, ID>>, ConnectError<'d, Error<'w, W>, ID>>

Source§

impl<'scope, 'w, 'd, W, ID> Fiber<'d> for Accept<'scope, 'w, 'd, W, ID>
where 'd: 'w, W: Spec + 'w, ID: Identity,

Source§

type Output = Result<Io<'scope, 'w, 'd, W, Id<'d, ID>>, Error<'d>>

Source§

impl<'target, 'd, F, T> Fiber<'d> for Wait<'target, 'd, F, T>
where F: FnMut(Pin<&mut Context<'_, 'd>>, Pin<&Waiter<'target, 'd>>) -> Poll<T>,