[][src]Struct drone_cortex_m::proc_loop::Fiber

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.

Methods

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 Yield = Out<<T as ProcLoop>::Req, <T as ProcLoop>::CmdRes>

The type of value this fiber yields.

type Return = !

The type of value this fiber returns on completion.

Auto Trait Implementations

impl<Sv, T> Unpin for Fiber<Sv, T> where
    Sv: Switch<Data<In<<T as ProcLoop>::Cmd, <T as ProcLoop>::ReqRes>, FiberState<Out<<T as ProcLoop>::Req, <T as ProcLoop>::CmdRes>, !>>>,
    <T as ProcLoop>::Cmd: Send,
    <T as ProcLoop>::CmdRes: Send,
    <T as ProcLoop>::Req: Send,
    <T as ProcLoop>::ReqRes: Send

impl<Sv, T> Send for Fiber<Sv, T> where
    Sv: Switch<Data<In<<T as ProcLoop>::Cmd, <T as ProcLoop>::ReqRes>, FiberState<Out<<T as ProcLoop>::Req, <T as ProcLoop>::CmdRes>, !>>>,
    <T as ProcLoop>::Cmd: Send,
    <T as ProcLoop>::CmdRes: Send,
    <T as ProcLoop>::Req: Send,
    <T as ProcLoop>::ReqRes: Send

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

Blanket Implementations

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

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> Into<U> for T where
    U: From<T>, 
[src]

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.

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

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

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