trustchain_core/
subject.rs

1//! DID subject API.
2use crate::utils::get_did_suffix;
3
4/// A DID Subject.
5pub trait Subject {
6    /// Returns the DID of the subject.
7    fn did(&self) -> &str;
8    /// Returns the DID suffix of the subject.
9    fn did_suffix(&self) -> &str {
10        get_did_suffix(self.did())
11    }
12}