Skip to main content

Attestation

Trait Attestation 

Source
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§

Required Methods§

Source

fn from_raw_data(data: &'a [u8]) -> Result<Self, DecodeError>

Source

fn to_raw_data_in<A: Allocator>( &self, alloc: A, ) -> Result<Vec<u8, A>, EncodeError>

Provided Methods§

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 Attestation<'_> for BitcoinAttestation

Source§

const TAG: AttestationTag = BITCOIN_TAG

Source§

impl<'a> Attestation<'a> for EASAttestation

Source§

const TAG: AttestationTag = EAS_ATTEST_TAG

Source§

impl<'a> Attestation<'a> for EASTimestamped

Source§

const TAG: AttestationTag = EAS_TIMESTAMP_TAG

Source§

impl<'a> Attestation<'a> for PendingAttestation<'a>

Source§

const TAG: AttestationTag = PENDING_TAG