macro_rules! claim_path {
($($component:expr),* $(,)?) => { ... };
}Available on crate feature
vc only.Expand description
A ClaimPath from components of mixed kinds: string
literals for names, integers for indexes, () for every element.
ยงExamples
use identity_kit::claim_path;
use identity_kit::vc::{ClaimPath, PathComponent};
let path = claim_path!["degrees", (), "type"];
assert_eq!(
path,
ClaimPath::from(vec![PathComponent::from("degrees"), PathComponent::All, PathComponent::from("type")])
);
assert_eq!(claim_path!["nationalities", 1].to_string(), r#"["nationalities", 1]"#);