Trait ed25519::SignatureEncoding

source ·
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 { ... }
}
Expand description

Support for decoding/encoding signatures as bytes.

Required Associated Types§

source

type Repr: 'static + AsRef<[u8]> + Clone + Send + Sync

Byte representation of a signature.

Provided Methods§

source

fn to_bytes(&self) -> Self::Repr

Encode signature as its byte representation.

source

fn to_vec(&self) -> Vec<u8>

Encode signature as a byte vector.

source

fn encoded_len(&self) -> usize

Get the length of this signature when encoded.

Object Safety§

This trait is not object safe.

Implementors§