rtic_core

Struct RticMacroBuilder

source
pub struct RticMacroBuilder { /* private fields */ }
Expand description

This should be used to compose an RTIC distribution. In other words, it allows building the RTIC app macro By providing the necessary low-level hardware bindings and binding additional Compilation Passes in the case syntax extensions are desired.

Implementations§

source§

impl RticMacroBuilder

source

pub fn new<T: CorePassBackend + 'static>(core_impl: T) -> Self

source

pub fn bind_pre_core_pass<P: RticPass + 'static>( &mut self, pass: P, ) -> &mut Self

Binds a Compilation Pass that will run before the Core Pass

source

pub fn bind_post_core_pass<P: RticPass + 'static>( &mut self, pass: P, ) -> &mut Self

Binds a Compilation Pass that will run after the Core Pass

source

pub fn build_rtic_macro( self, args: TokenStream, input: TokenStream, ) -> TokenStream

Once the CorePass low level hardware bindings are provided, and a selection of Compilation Passes are binded too, use this method to run the app proc macro logic.

Returns a TokenStream of the expanded user application.

Auto Trait Implementations§

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.