Crates.io | general-structs |
lib.rs | general-structs |
version | 0.2.0 |
source | src |
created_at | 2024-05-27 18:12:58.563966 |
updated_at | 2024-05-28 01:45:16.359771 |
description | General-structures - this library allows you to create structures with common fields, and those that are different can be specified individually. |
homepage | https://github.com/MayorDi/general-structs |
repository | https://github.com/MayorDi/general-structs |
max_upload_size | |
id | 1253647 |
size | 18,927 |
general-structures
- this library allows you to create structures with common fields, and those that are different can be specified individually.
general_structs! {
#[derive(Debug, Clone, Copy)]
struct Foo1 + Foo2<T> + Foo3 {
bar1: f32,
pub bar2: usize,
}
Foo2<T> {
generic_bar: T
}
}
#[derive(Debug, Clone, Copy)]
struct Foo1 {
bar1: f32,
pub bar2: usize,
}
#[derive(Debug, Clone, Copy)]
struct Foo2<T> {
bar1: f32,
pub bar2: usize,
generic_bar: T
}
#[derive(Debug, Clone, Copy)]
struct Foo3 {
bar1: f32,
pub bar2: usize,
}