pub struct Doc {
pub context: Vec<DIDContext>,
pub id: DIDSyntax,
pub authentication: Option<Vec<Primary>>,
pub cap_invoke: Option<Vec<Primary>>,
pub cap_delegate: Option<Vec<Primary>>,
pub assertion: Option<Vec<Primary>>,
}Expand description
Doc is a main data structure modeling the core properties
from the DID Document
Fields§
§context: Vec<DIDContext>§id: DIDSyntax§authentication: Option<Vec<Primary>>§cap_invoke: Option<Vec<Primary>>§cap_delegate: Option<Vec<Primary>>§assertion: Option<Vec<Primary>>Implementations§
Source§impl Doc
impl Doc
pub fn generate(did: String) -> Self
pub fn add_context(&mut self, context: DIDContext) -> &mut Self
pub fn add_assertion(&mut self, assertion: Primary) -> &mut Self
pub fn add_authentication(&mut self, auth: Primary) -> &mut Self
pub fn add_cap_delegate(&mut self, delegate: Primary) -> &mut Self
pub fn add_cap_invoke(&mut self, invoke: Primary) -> &mut Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Doc
impl<'de> Deserialize<'de> for Doc
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
Auto Trait Implementations§
impl Freeze for Doc
impl RefUnwindSafe for Doc
impl Send for Doc
impl Sync for Doc
impl Unpin for Doc
impl UnwindSafe for Doc
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