Skip to content

450220020/ioc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ioc

rust new ioc

#[autowired] static defsingle: Option = None;

// 展开 // macro_rules! defsingle { // () => { // single_get!( "defsingle", EntityObj) // }; // } //这里是注入,后面还需要撸全局扫描注册组件,写法应该几乎一致,同样可用的内容还有这几个crate singlemap,iocmap,aop,extends-rs

#[test] fn test_one() { single_add!( "defsingle", Box::new(EntityObj { key: "hhhhh".to_string() }) ); println!("注入后获取值 :{:?}", defsingle!().key); }

About

rust new ioc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages