ssi_vc/v2/data_model/
presentation.rs1use iref::Uri;
2
3use super::Credential;
4
5pub use crate::v1::PresentationTypes;
6use crate::{Identified, MaybeIdentified};
7
8pub trait Presentation: MaybeIdentified {
10 type Credential: Credential;
12
13 type Holder: Identified;
15
16 fn id(&self) -> Option<&Uri> {
18 MaybeIdentified::id(self)
19 }
20
21 fn additional_types(&self) -> &[String] {
23 &[]
24 }
25
26 fn types(&self) -> PresentationTypes {
27 PresentationTypes::from_additional_types(self.additional_types())
28 }
29
30 fn verifiable_credentials(&self) -> &[Self::Credential] {
31 &[]
32 }
33
34 fn holders(&self) -> &[Self::Holder] {
35 &[]
36 }
37}