#[non_exhaustive]pub struct ClaimMetadata {
pub path: ClaimPath,
pub display: Vec<ClaimDisplay>,
pub mandatory: Option<bool>,
pub sd: Option<SdPolicy>,
pub svg_id: Option<String>,
pub additional: IndexMap<String, Value>,
}Available on crate feature
sd-jwt only.Expand description
Metadata for the claim or claims at a path (§5.6).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: ClaimPathWhich claim(s) this describes.
display: Vec<ClaimDisplay>Display information per locale.
mandatory: Option<bool>Whether the issuer must include the claim; None is omitted, which means false.
sd: Option<SdPolicy>Whether the claim is selectively disclosable; None is omitted, which means
SdPolicy::Allowed.
svg_id: Option<String>The id of the claim in SVG templates.
additional: IndexMap<String, Value>Every other property.
Implementations§
Source§impl ClaimMetadata
impl ClaimMetadata
Sourcepub fn with_display(self, display: ClaimDisplay) -> Self
pub fn with_display(self, display: ClaimDisplay) -> Self
This metadata with display added.
Sourcepub fn with_mandatory(self, mandatory: bool) -> Self
pub fn with_mandatory(self, mandatory: bool) -> Self
This metadata with mandatory.
Sourcepub fn with_svg_id(self, svg_id: impl Into<String>) -> Self
pub fn with_svg_id(self, svg_id: impl Into<String>) -> Self
This metadata with svg_id.
Sourcepub fn is_mandatory(&self) -> bool
pub fn is_mandatory(&self) -> bool
Whether the claim is mandatory: mandatory, false when omitted.
Sourcepub fn sd_policy(&self) -> SdPolicy
pub fn sd_policy(&self) -> SdPolicy
The selective disclosure policy: sd, SdPolicy::Allowed when omitted.
Trait Implementations§
Source§impl Clone for ClaimMetadata
impl Clone for ClaimMetadata
Source§impl Debug for ClaimMetadata
impl Debug for ClaimMetadata
Source§impl<'de> Deserialize<'de> for ClaimMetadata
impl<'de> Deserialize<'de> for ClaimMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ClaimMetadata
Source§impl PartialEq for ClaimMetadata
impl PartialEq for ClaimMetadata
Source§impl PartialSchema for ClaimMetadata
Available on crate feature utoipa only.
impl PartialSchema for ClaimMetadata
Available on crate feature
utoipa only.Source§impl Serialize for ClaimMetadata
impl Serialize for ClaimMetadata
impl StructuralPartialEq for ClaimMetadata
Auto Trait Implementations§
impl Freeze for ClaimMetadata
impl RefUnwindSafe for ClaimMetadata
impl Send for ClaimMetadata
impl Sync for ClaimMetadata
impl Unpin for ClaimMetadata
impl UnsafeUnpin for ClaimMetadata
impl UnwindSafe for ClaimMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.