pub trait SignatureEncoding:
Sized
+ Clone
+ for<'a> TryFrom<&'a [u8]>
+ TryInto<Self::Repr> {
type Repr: 'static + AsRef<[u8]> + Clone + Send + Sync;
// Provided methods
fn to_bytes(&self) -> Self::Repr { ... }
fn to_vec(&self) -> Vec<u8> ⓘ { ... }
fn encoded_len(&self) -> usize { ... }
}
Available on crate feature
signature
only.Expand description
Support for decoding/encoding signatures as bytes.
Required Associated Types§
Provided Methods§
Sourcefn to_vec(&self) -> Vec<u8> ⓘ
Available on crate feature alloc
only.
fn to_vec(&self) -> Vec<u8> ⓘ
alloc
only.Encode signature as a byte vector.
Sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Get the length of this signature when encoded.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl SignatureEncoding for ring_compat::signature::ed25519::Signature
impl SignatureEncoding for ring_compat::signature::ed25519::Signature
Source§impl<C> SignatureEncoding for ring_compat::signature::ecdsa::der::Signature<C>
Available on crate feature alloc
only.
impl<C> SignatureEncoding for ring_compat::signature::ecdsa::der::Signature<C>
Available on crate feature
alloc
only.