doc: add deepwiki badge
Transmissing metainfo across components.
Metainfo is designed to be passed through task local, so we provided a unified key for it metainfo::METAINFO, and we recommend you to use it this way:
metainfo::METAINFO
METAINFO.scope(...)
MetaInfo is used to passthrough information between components and even client-server.
MetaInfo
It supports two types of info: typed map and string k-v.
It is designed to be tree-like, which means you can share a MetaInfo with multiple children.
Note: only the current scope is mutable.
Example:
use metainfo::MetaInfo; fn test() { let mut m1 = MetaInfo::new(); m1.insert::<i8>(2); assert_eq!(*m1.get::<i8>().unwrap(), 2); let (mut m1, mut m2) = m1.derive(); assert_eq!(*m2.get::<i8>().unwrap(), 2); m2.insert::<i8>(4); assert_eq!(*m2.get::<i8>().unwrap(), 4); m2.remove::<i8>(); assert_eq!(*m2.get::<i8>().unwrap(), 2); }
See CONTRIBUTING.md for more information.
Metainfo is dual-licensed under the MIT license and the Apache License (Version 2.0).
See LICENSE-MIT and LICENSE-APACHE for details.
Email: volo@cloudwego.io
How to become a member: COMMUNITY MEMBERSHIP
Issues: Issues
Feishu: Scan the QR code below with Feishu or click this link to join our CloudWeGo Volo user group.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Metainfo
Transmissing metainfo across components.
Quickstart
Metainfo is designed to be passed through task local, so we provided a unified key for it
metainfo::METAINFO, and we recommend you to use it this way:MetaInfois used to passthrough information between components and even client-server.It supports two types of info: typed map and string k-v.
It is designed to be tree-like, which means you can share a
MetaInfowith multiple children.Note: only the current scope is mutable.
Example:
Related Projects
Contributing
See CONTRIBUTING.md for more information.
License
Metainfo is dual-licensed under the MIT license and the Apache License (Version 2.0).
See LICENSE-MIT and LICENSE-APACHE for details.
Community
Email: volo@cloudwego.io
How to become a member: COMMUNITY MEMBERSHIP
Issues: Issues
Feishu: Scan the QR code below with Feishu or click this link to join our CloudWeGo Volo user group.