Crates.io | derrive-ops |
lib.rs | derrive-ops |
version | 0.1.0 |
source | src |
created_at | 2024-04-17 06:04:48.665172 |
updated_at | 2024-04-17 06:04:48.665172 |
description | Derives for componetwise opperations |
homepage | |
repository | https://github.com/abss-witch/derive-ops/ |
max_upload_size | |
id | 1211069 |
size | 12,798 |
Custom derive macros to implement component wise opperations.
use derive_ops::CmpOps;
#[derive(CmpOps)]
struct Point{
a: f32,
b: i8,
c: i16
}
Alternatively you can include individual opperations.
use derive_ops::{CmpRemAssign, CmpMul};
#[derive(CmpRemAssign, CmpMul)]
struct Point{
a: f32,
b: i8,
c: i16
}
Includes derives for add, add assign, sub, sub assign, mul, mul assign, div, div assign, rem, rem assign and neg