Enum matrix_sdk_crypto::types::Signature
source · pub enum Signature {
Ed25519(Ed25519Signature),
Other(String),
}
Expand description
Represents a potentially decoded signature (but not a validated one).
There are two important cases here:
- If the claimed algorithm is supported and the payload has an expected
format, the signature will be represent by the enum variant corresponding
to that algorithm. For example, decodeable Ed25519 signatures are
represented as
Ed25519(...)
. - If the claimed algorithm is unsupported, the signature is represented as
Other(...)
.
Variants§
Ed25519(Ed25519Signature)
A Ed25519 digital signature.
Other(String)
A digital signature in an unsupported algorithm. The raw signature bytes are represented as a base64-encoded string.
Implementations§
Trait Implementations§
source§impl From<Ed25519Signature> for Signature
impl From<Ed25519Signature> for Signature
source§fn from(signature: Ed25519Signature) -> Self
fn from(signature: Ed25519Signature) -> Self
Converts to this type from the input type.
source§impl PartialEq for Signature
impl PartialEq for Signature
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.