Struct App

Source
pub struct App {
    pub args: AppArgs,
    pub name: Ident,
    pub inits: Inits,
    pub idles: Idles,
    pub late_resources: Map<LateResource>,
    pub resources: Map<Resource>,
    pub hardware_tasks: Map<HardwareTask>,
    pub software_tasks: Map<SoftwareTask>,
    pub extern_interrupts: ExternInterrupts,
    /* private fields */
}
Expand description

The #[app] attribute

Fields§

§args: AppArgs

The arguments to the #[app] attribute

§name: Ident

The name of the const item on which the #[app] attribute has been placed

§inits: Inits

Per-core #[init] functions

§idles: Idles

Per-core #[idle] functions

§late_resources: Map<LateResource>

Late (runtime initialized) resources

§resources: Map<Resource>

Early (compile time initialized) resources

§hardware_tasks: Map<HardwareTask>

Hardware tasks: #[task(binds = ..)]s

§software_tasks: Map<SoftwareTask>

Software tasks: #[task]

§extern_interrupts: ExternInterrupts

Interrupts used to dispatch software tasks

Implementations§

Source§

impl App

Source

pub fn uses_schedule(&self, core: u8) -> bool

Whether this core uses the schedule API

Source

pub fn resource(&self, name: &Ident) -> Option<(&LateResource, Option<&Expr>)>

Returns information about the resource that matches name

Source

pub fn resources<'a>( &'a self, analysis: &'a Analysis, ) -> impl Iterator<Item = (&'a Ident, &'a LateResource, Option<&'a Expr>, &'a Location)>

Returns an iterator over all live resources

Source

pub fn schedule_callers<'a>( &'a self, ) -> impl Iterator<Item = (Context<'a>, &'a Set<Ident>)>

Iterates over all spawn callers

Source

pub fn spawn_callers<'a>( &'a self, ) -> impl Iterator<Item = (Context<'a>, &'a Set<Ident>)>

Iterates over all spawn callers

Trait Implementations§

Source§

impl Debug for App

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for App

§

impl RefUnwindSafe for App

§

impl !Send for App

§

impl !Sync for App

§

impl Unpin for App

§

impl UnwindSafe for App

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.