identity_credential/sd_jwt_vc/metadata/
display.rs

1// Copyright 2020-2024 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4use serde::Deserialize;
5use serde::Serialize;
6use serde_json::Value;
7
8/// Credential type's display information of a given language.
9#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
10pub struct DisplayMetadata {
11  /// Language tag as defined in [RFC5646](https://www.rfc-editor.org/rfc/rfc5646.txt).
12  pub lang: String,
13  /// VC type's human-readable name.
14  pub name: String,
15  /// VC type's human-readable description.
16  pub description: Option<String>,
17  /// Optional rendering information.
18  pub rendering: Option<RenderingMetadata>,
19}
20
21/// Information on how to render a given credential type.
22#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
23pub struct RenderingMetadata(serde_json::Map<String, Value>);