| Crates.io | ev3dev-lang-rust-derive |
| lib.rs | ev3dev-lang-rust-derive |
| version | 0.10.0 |
| created_at | 2019-12-08 09:43:37.938924+00 |
| updated_at | 2021-02-02 13:02:34.897455+00 |
| description | Derive macros for ev3dev_lang_rust |
| homepage | |
| repository | https://github.com/pixix4/ev3dev-lang-rust |
| max_upload_size | |
| id | 187261 |
| size | 3,270 |
This crate provides some derive macros to simplify the codebase.
The following traits can be automatically derived:
DeviceFindableMotorTachoMotorServoMotorDcMotorSensorThe findable derive needs 3 additional attributes.
class_name: &strdriver_name: &strport: dyn ev3dev_lang_rust::MotorThe functionallity of the LargeMotor struct consists complitly through derives:
#[derive(Debug, Clone, Device, Findable, Motor, TachoMotor)]
#[class_name = "tacho-motor"]
#[driver_name = "lego-ev3-l-motor"]
#[port = "crate::motors::MotorPort"]
pub struct LargeMotor {
driver: Driver,
}