pub trait Attestation<'a>: Sized {
const TAG: AttestationTag;
// Required methods
fn from_raw_data(data: &'a [u8]) -> Result<Self, DecodeError>;
fn to_raw_data_in<A: Allocator>(
&self,
alloc: A,
) -> Result<Vec<u8, A>, EncodeError>;
// Provided methods
fn from_raw<A: Allocator>(
raw: &'a RawAttestation<A>,
) -> Result<Self, DecodeError> { ... }
fn to_raw(&self) -> Result<RawAttestation, EncodeError> { ... }
fn to_raw_in<A: Allocator>(
&self,
alloc: A,
) -> Result<RawAttestation<A>, EncodeError> { ... }
}Required Associated Constants§
const TAG: AttestationTag
Required Methods§
fn from_raw_data(data: &'a [u8]) -> Result<Self, DecodeError>
fn to_raw_data_in<A: Allocator>( &self, alloc: A, ) -> Result<Vec<u8, A>, EncodeError>
Provided Methods§
fn from_raw<A: Allocator>( raw: &'a RawAttestation<A>, ) -> Result<Self, DecodeError>
fn to_raw(&self) -> Result<RawAttestation, EncodeError>
fn to_raw_in<A: Allocator>( &self, alloc: A, ) -> Result<RawAttestation<A>, EncodeError>
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.