Struct drone_cortexm::proc_loop::Fiber[][src]

pub struct Fiber<Sv, T>(_)
where
    Sv: SvCall<SwitchBackService>,
    Sv: SvCall<SwitchContextService>,
    T: ProcLoop<Context = Yielder<Sv, T>>
;

A wrapper for fib::FiberProc that runs the command loop T.

Implementations

impl<Sv, T> Fiber<Sv, T> where
    Sv: SvCall<SwitchBackService>,
    Sv: SvCall<SwitchContextService>,
    T: ProcLoop<Context = Yielder<Sv, T>>, 
[src]

pub fn new() -> Self[src]

Creates a new command loop for T.

Panics

If MPU is not present.

pub unsafe fn new_unchecked() -> Self[src]

Creates a new command loop for T, without MPU.

Safety

Unprotected from stack overflow.

Trait Implementations

impl<Sv, T> Drop for Fiber<Sv, T> where
    Sv: SvCall<SwitchBackService>,
    Sv: SvCall<SwitchContextService>,
    T: ProcLoop<Context = Yielder<Sv, T>>, 
[src]

impl<Sv, T> Fiber for Fiber<Sv, T> where
    Sv: SvCall<SwitchBackService>,
    Sv: SvCall<SwitchContextService>,
    T: ProcLoop<Context = Yielder<Sv, T>>, 
[src]

type Input = In<<T as ProcLoop>::Cmd, <T as ProcLoop>::ReqRes>

The type of value this fiber consumes on each resume.

type Return = !

The type of value this fiber returns on completion.

type Yield = Out<<T as ProcLoop>::Req, <T as ProcLoop>::CmdRes>

The type of value this fiber yields.

Auto Trait Implementations

impl<Sv, T> Send for Fiber<Sv, T>

impl<Sv, T> !Sync for Fiber<Sv, T>

impl<Sv, T> Unpin for Fiber<Sv, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.