pub struct CommandCodeAttributesBuilder { /* private fields */ }
Expand description
A builder for CommandCodeAttributes
Implementations§
source§impl CommandCodeAttributesBuilder
impl CommandCodeAttributesBuilder
sourcepub fn with_command_index(self, command_index: u16) -> Self
pub fn with_command_index(self, command_index: u16) -> Self
Sets the command code to the specified value in the builder.
sourcepub fn with_extensive(self, set: bool) -> Self
pub fn with_extensive(self, set: bool) -> Self
Sets the ‘extensive’ bit in the builder.
sourcepub fn with_flushed(self, set: bool) -> Self
pub fn with_flushed(self, set: bool) -> Self
Sets the ‘flushed’ bit in the builder.
sourcepub fn with_c_handles(self, value: u8) -> Self
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.
sourcepub fn with_r_handle(self, set: bool) -> Self
pub fn with_r_handle(self, set: bool) -> Self
Sets the ‘r_handle’ bit in the builder.
sourcepub fn with_vendor_specific(self, set: bool) -> Self
pub fn with_vendor_specific(self, set: bool) -> Self
Sets the ‘V’(i.e. vendor specific) bit in the builder.
sourcepub fn build(self) -> Result<CommandCodeAttributes>
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
impl Clone for CommandCodeAttributesBuilder
source§fn clone(&self) -> CommandCodeAttributesBuilder
fn clone(&self) -> CommandCodeAttributesBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CommandCodeAttributesBuilder
impl Debug for CommandCodeAttributesBuilder
source§impl PartialEq for CommandCodeAttributesBuilder
impl PartialEq for CommandCodeAttributesBuilder
source§fn eq(&self, other: &CommandCodeAttributesBuilder) -> bool
fn eq(&self, other: &CommandCodeAttributesBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CommandCodeAttributesBuilder
impl Eq for CommandCodeAttributesBuilder
impl StructuralPartialEq for CommandCodeAttributesBuilder
Auto Trait Implementations§
impl Freeze for CommandCodeAttributesBuilder
impl RefUnwindSafe for CommandCodeAttributesBuilder
impl Send for CommandCodeAttributesBuilder
impl Sync for CommandCodeAttributesBuilder
impl Unpin for CommandCodeAttributesBuilder
impl UnwindSafe for CommandCodeAttributesBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more