pub struct VP {
pub contexts: Vec<Context>,
pub types: Vec<Type>,
pub verifiable_credential: Vec<VC>,
pub proof: Option<Proof>,
pub holder: Option<String>,
}Expand description
VP a main object used to generate DID VP. The VP object MUST contains
a VC object, it may be a single VC or multiple
Fields§
§contexts: Vec<Context>§types: Vec<Type>§verifiable_credential: Vec<VC>§proof: Option<Proof>§holder: Option<String>Implementations§
Source§impl VP
impl VP
pub fn new() -> Self
pub fn add_context(&mut self, context: Context) -> &mut Self
pub fn add_type(&mut self, t: Type) -> &mut Self
pub fn add_credential(&mut self, cred: VC) -> &mut Self
pub fn add_proof(&mut self, proof: Proof) -> &mut Self
pub fn set_holder(&mut self, holder: String) -> &mut Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VP
impl<'de> Deserialize<'de> for VP
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
Source§impl Proofable for VP
impl Proofable for VP
fn get_proof(&self) -> Option<Proof>
fn setup_proof(&mut self, proof: Proof) -> &mut Self
fn parse_json_bytes(bytes: Vec<u8>) -> Result<Self, ProofError>
fn remove_proof(&self) -> Self
impl StructuralPartialEq for VP
Auto Trait Implementations§
impl Freeze for VP
impl RefUnwindSafe for VP
impl Send for VP
impl Sync for VP
impl Unpin for VP
impl UnwindSafe for VP
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