Skip to main content

ReportVariant

Enum ReportVariant 

Source
pub enum ReportVariant {
    V2,
    V3,
    V5,
}
Expand description

Possible variants of the attestation report.

Variants§

§

V2

Version 2 of the Attestation Report.

§

V3

Version 3 of the Attestation Report for PreTurin CPUs.

§

V5

Version 5 of the Attestation Report

Trait Implementations§

Source§

impl ByteParser<()> for ReportVariant

Source§

const EXPECTED_LEN: Option<usize>

Expected size of the byte container
Source§

type Bytes = [u8; 4]

Byte container definition Must be constructible and mutable as bytes for encoding,
Source§

fn from_bytes_with(bytes: &[u8], params: P) -> Result<Self, Error>
where Self: Sized + Decoder<P>,

Decode from an owned byte container with params.
Source§

fn to_bytes_with(&self, params: P) -> Result<Self::Bytes, Error>
where Self: Encoder<P>, Self::Bytes: TryFrom<Vec<u8>>,

Encode into an owned byte container with params.
Source§

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
where Self: Sized + Decoder<()>,

Helper from_bytes Function in case no parameters are needed
Source§

fn to_bytes(&self) -> Result<Self::Bytes, Error>
where Self: Encoder<()>, Self::Bytes: TryFrom<Vec<u8>>,

Helper to_bytes function in case no parameters are needed
Source§

impl Decoder<()> for ReportVariant

Source§

fn decode(reader: &mut impl Read, _: ()) -> Result<Self, Error>

Decodes from the reader with the given parameters.
Source§

impl Encoder<()> for ReportVariant

Source§

fn encode(&self, writer: &mut impl Write, _: ()) -> Result<(), Error>

Encodes the object to raw bytes.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.