in_struct

Crates.ioin_struct
lib.rsin_struct
version1.0.1
sourcesrc
created_at2024-04-21 13:02:56.349009
updated_at2024-04-21 13:27:22.345504
descriptionAn attribute-like procedural macro for defining structs for use in functions
homepage
repositoryhttps://github.com/qussaif10/in_struct
max_upload_size
id1215350
size5,953
(qussaif10)

documentation

README

This macro was very useful to me when using actix, instead of making a bunch of structs for each possible json, you can use this macro and simply define the struct with a macro above the functions. To use this macro you can do the following:

use in_struct::define_struct;

#[define_struct(name = Name, derives = [Debug], fields = {field_1: i32, field_2: String})]
fn func(x: Name) {
     println!("{:?}", x);
}
Commit count: 4

cargo fmt