pub enum MethodRef {
Reference(DidUrlReference),
Embedded(Box<VerificationMethod>),
}Expand description
An entry of a verification relationship: a reference to a method in verificationMethod,
or a method embedded in the relationship and usable for that purpose only (DID Core §5.3).
Variants§
Reference(DidUrlReference)
A DID URL (possibly relative) of a method listed under verificationMethod.
Embedded(Box<VerificationMethod>)
A method defined in place.
Implementations§
Source§impl MethodRef
impl MethodRef
Sourcepub fn reference(id: impl Into<DidUrlReference>) -> Self
pub fn reference(id: impl Into<DidUrlReference>) -> Self
A reference to id.
Sourcepub fn embedded(method: VerificationMethod) -> Self
pub fn embedded(method: VerificationMethod) -> Self
An embedded method.
Sourcepub fn as_embedded(&self) -> Option<&VerificationMethod>
pub fn as_embedded(&self) -> Option<&VerificationMethod>
The embedded method, if this entry embeds one.
Sourcepub fn as_reference(&self) -> Option<&DidUrlReference>
pub fn as_reference(&self) -> Option<&DidUrlReference>
The reference, if this entry is one.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MethodRef
impl<'de> Deserialize<'de> for MethodRef
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MethodRef
Source§impl From<DidUrlReference> for MethodRef
impl From<DidUrlReference> for MethodRef
Source§fn from(reference: DidUrlReference) -> Self
fn from(reference: DidUrlReference) -> Self
Converts to this type from the input type.
Source§impl From<VerificationMethod> for MethodRef
impl From<VerificationMethod> for MethodRef
Source§fn from(method: VerificationMethod) -> Self
fn from(method: VerificationMethod) -> Self
Converts to this type from the input type.
Source§impl PartialSchema for MethodRef
Available on crate feature utoipa only.
impl PartialSchema for MethodRef
Available on crate feature
utoipa only.impl StructuralPartialEq for MethodRef
Auto Trait Implementations§
impl Freeze for MethodRef
impl RefUnwindSafe for MethodRef
impl Send for MethodRef
impl Sync for MethodRef
impl Unpin for MethodRef
impl UnsafeUnpin for MethodRef
impl UnwindSafe for MethodRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.