Derive Macro Storable
#[derive(Storable)]
{
// Attributes available to this derive:
#[storable]
}
Expand description
Implements Storable for a struct or enum with DataType = Self.
For non-Self data types you should manually implement the trait.
ยงAttributes
crate = ::veecle_os_runtime: Overrides the path to theveecle-os-runtimecrate in case the import was renamed.
use core::fmt::Debug;
use veecle_os_runtime::Storable;
#[derive(Debug, Storable)]
pub struct Sensor<T>
where
T: Debug,
{
test: u8,
test0: u8,
test1: T,
}
#[derive(Debug, Storable)]
pub struct Motor {
test: u8,
}
#[derive(Debug, Storable)]
pub enum Actuator {
Variant1,
Variant2(u8),
Variant3 { test: u8 },
}