Attribute Macro actor
#[actor]
Expand description
Generates an Actor
from a function.
use veecle_os_runtime::{Reader, Writer};
#[veecle_os_runtime::actor]
async fn macro_test_actor(
_sensor_reader: Reader<'_, Sensor>,
_sensor_writer: Writer<'_, Sensor>,
#[init_context] _my_init_context: u32,
) -> Infallible {
loop {
// Do things.
}
}
§Attribute Arguments
§crate
If necessary the path to veecle-os-runtime
can be overridden by passing a crate = ::some::path
argument.
extern crate veecle_os_runtime as my_veecle_os_runtime;
use my_veecle_os_runtime::{Reader, Writer};
#[my_veecle_os_runtime::actor(crate = my_veecle_os_runtime)]
async fn macro_test_actor(
_sensor_reader: Reader<'_, Sensor>,
_sensor_writer: Writer<'_, Sensor>,
#[init_context] _my_init_context: u32,
) -> Infallible {
loop {
// Do things.
}
}