[−][src]Struct caelum_vcdm::verifiable_credential::VerifiableCredential
Fields
context: Vec<String>
credential_type: Vec<String>
claims: Vec<Claim>
id: String
issuer: String
proofs: Vec<Proof>
non_revocation_proof: Vec<NonRevocationProof>
Methods
impl VerifiableCredential
[src]
pub fn new(id: String) -> Self
[src]
Rust Verifiable Credential Constructor
VerifiableCredential
's constructor will create an empty VerifiableCredential
object.
By default properties context
and credential_type
are set. With "my_id" as an id
the following structure is given:
{
context: [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
type: ["VerifiableCredential", "PersonalInformation"],
id: "id_credential",
claims: [{
id: "",
credentialStatus: { id: "", type: "" },
credentialSubject: [{
email: "example@example.com"
}],
issuer: "",
issuanceDate: "",
type: ["VerifiableCredential", "PersonalInformation"],
}],
proofs: [{
type: "",
created: "",
verificationMethod: "",
signatureValue: ""
}],
nonRevocationProof: [{
type: "",
created: "",
verificationMethod: "",
signatureValue: ""
}]
}
Note: An empty object is not a valid VerifiableCredential
.
pub fn to_json(&self) -> JsValue
[src]
pub fn to_str(&self) -> String
[src]
Trait Implementations
impl Clone for VerifiableCredential
[src]
fn clone(&self) -> VerifiableCredential
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for VerifiableCredential
[src]
impl Debug for VerifiableCredential
[src]
impl Serialize for VerifiableCredential
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for VerifiableCredential
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for VerifiableCredential
impl Sync for VerifiableCredential
impl Unpin for VerifiableCredential
impl UnwindSafe for VerifiableCredential
impl RefUnwindSafe for VerifiableCredential
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T> Same<T> for T
type Output = T
Should always be Self