| Crates.io | stepper_macros |
| lib.rs | stepper_macros |
| version | 0.1.1 |
| created_at | 2023-06-01 09:55:06.419194+00 |
| updated_at | 2023-06-06 12:26:24.945677+00 |
| description | Macros for the stepper_lib |
| homepage | |
| repository | https://github.com/SamuelNoesslboeck/stepper_lib |
| max_upload_size | |
| id | 879626 |
| size | 7,450 |
A helper crate for proc-macros used by the stepper_lib.
Includes a derive proc-macro to implement SyncCompGroup for a struct consisting of only fields that include SyncComp.
use stepper_lib::prelude::*;
// Simple group of components that consists of multiple fields
#[derive(SyncCompGroup)] // Automatically implements SyncCompGroup
#[derive(StepperCompGroup)] // Automatically implements StepperCompGroup
struct TestGroup {
pub base : StepperCtrl,
pub arm : StepperCtrl
}
fn main() {
let test = TestGroup {
base: StepperCtrl::new_sim(StepperConst::GEN),
arm: StepperCtrl::new_sim(StepperConst::GEN)
};
let test_ref : &dyn SyncCompGroup<2> = &test;
// Usually requires multiple curve builders
let path_builder : PathBuilder<2> = test.create_path_builder();
}