syact_macros

Crates.iosyact_macros
lib.rssyact_macros
version0.1.1
sourcesrc
created_at2023-07-03 20:41:06.414554
updated_at2024-05-06 21:52:06.388758
descriptionMacros for the syact
homepage
repositoryhttps://github.com/SamuelNoesslboeck/syact
max_upload_size
id907428
size8,747
Samuel Nösslböck (SamuelNoesslboeck)

documentation

README

syact_macros

A helper crate for proc-macros used by the syact.

SyncCompGroup

Includes a derive proc-macro to implement SyncCompGroup for a struct consisting of only fields that include SyncComp.

use syact::prelude::*;

// Simple group of components that consists of multiple fields
#[derive(SyncCompGroup)]        // Automatically implements SyncCompGroup
#[derive(StepperCompGroup)]     // Automatically implements StepperCompGroup
struct TestGroup {
    pub base : Stepper,
    pub arm : Stepper
}

fn main() {
    let test = TestGroup {
        base: Stepper::new_gen(StepperConst::GEN),
        arm: Stepper::new_gen(StepperConst::GEN)
    };

    let test_ref : &dyn SyncCompGroup<2> = &test;

    // Usually requires multiple curve builders
    let path_builder : PathBuilder<2> = test.create_path_builder();
}
Commit count: 485

cargo fmt