Skip to main content

CommandCodeAttributesBuilder

Struct CommandCodeAttributesBuilder 

Source
pub struct CommandCodeAttributesBuilder { /* private fields */ }
Expand description

A builder for CommandCodeAttributes

Implementations§

Source§

impl CommandCodeAttributesBuilder

Source

pub const fn new() -> Self

Creates a new command code attributes builder.

Source

pub fn with_command_index(self, command_index: u16) -> Self

Sets the command code to the specified value in the builder.

Source

pub fn with_nv(self, set: bool) -> Self

Sets the ‘nv’ bit in the builder.

Source

pub fn with_extensive(self, set: bool) -> Self

Sets the ‘extensive’ bit in the builder.

Source

pub fn with_flushed(self, set: bool) -> Self

Sets the ‘flushed’ bit in the builder.

Source

pub fn with_c_handles(self, value: u8) -> Self

Sets the three ‘c_handles’ bits in the builder.

§Details

All bits besides the three first in the provided argument will be ignored.

Source

pub fn with_r_handle(self, set: bool) -> Self

Sets the ‘r_handle’ bit in the builder.

Source

pub fn with_vendor_specific(self, set: bool) -> Self

Sets the ‘V’(i.e. vendor specific) bit in the builder.

Source

pub fn build(self) -> Result<CommandCodeAttributes>

Builds the command code attributes

§Errors

Returns an error if command index is not a command index associated with a CommandCode specified in the TPM specification.

Trait Implementations§

Source§

impl Clone for CommandCodeAttributesBuilder

Source§

fn clone(&self) -> CommandCodeAttributesBuilder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CommandCodeAttributesBuilder

Source§

impl Debug for CommandCodeAttributesBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CommandCodeAttributesBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for CommandCodeAttributesBuilder

Source§

impl PartialEq for CommandCodeAttributesBuilder

Source§

fn eq(&self, other: &CommandCodeAttributesBuilder) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CommandCodeAttributesBuilder

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Free for T

Source§

unsafe fn free(ptr_ref: NonNull<T>)

Drops the content pointed by this pointer and frees it. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.