Crates.io | extends-rs |
lib.rs | extends-rs |
version | 0.1.6 |
source | src |
created_at | 2022-01-12 04:38:45.542553 |
updated_at | 2022-01-22 08:33:26.512988 |
description | rust extends impl a macro attr |
homepage | |
repository | |
max_upload_size | |
id | 512580 |
size | 32,503 |
rust extends struct
//extends=rsdata::dbs::arbatis::base_struct::BaseDO@struct 注意BaseDO 与struct中间有个阿尔法符号 用来标记继承那种类型的内容
//同级crate 中 rsdata/src/dbs/arbatis/base_struct.rs struct BaseDO
//如果不存在向上一级寻找 仅1次
#[extends_struct(derive="Debug,Clone"&&extends="rsdata::dbs::arbatis::base_struct::BaseDO@struct")]
struct bbc {
pub a: Option<i8>,
}
#[test]
fn showa() {
println!("{:#?}", bbc::new_none());
let mut a = bbc::new_none();
a.result = Some(false);
println!("{:#?}", a);
println!("aaffff:{:?}", bbc::get_struct_attr_str());
}