pub enum StatementObject {
Id(String),
DigestMultibase(String),
Value(Value),
}Expand description
What a statement says about its subject: exactly one of id, digestMultibase or
value.
An object carrying two of them, or none, or any other member, is refused at parse.
Variants§
Id(String)
A DID or other IRI naming a party or a thing.
DigestMultibase(String)
The digest of another credential, as crate::digest_multibase_json computes it
over that credential excluding its top-level proof.
Value(Value)
A literal or structured payload. Any JSON, including null.
Defined in the DTG context as @json, so it is an opaque JSON literal canonicalized
by JCS rather than a nested graph.
Implementations§
Source§impl StatementObject
impl StatementObject
Sourcepub fn kind(&self) -> ObjectKind
pub fn kind(&self) -> ObjectKind
Which of the three members this is.
Sourcepub fn digest_multibase(&self) -> Option<&str>
pub fn digest_multibase(&self) -> Option<&str>
object.digestMultibase, if that is what this is.
Trait Implementations§
Source§impl Clone for StatementObject
impl Clone for StatementObject
Source§impl Debug for StatementObject
impl Debug for StatementObject
Source§impl<'de> Deserialize<'de> for StatementObject
impl<'de> Deserialize<'de> for StatementObject
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 PartialEq for StatementObject
impl PartialEq for StatementObject
Source§impl Serialize for StatementObject
impl Serialize for StatementObject
impl StructuralPartialEq for StatementObject
Auto Trait Implementations§
impl Freeze for StatementObject
impl RefUnwindSafe for StatementObject
impl Send for StatementObject
impl Sync for StatementObject
impl Unpin for StatementObject
impl UnsafeUnpin for StatementObject
impl UnwindSafe for StatementObject
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