pub struct CommandCodeAttributesBuilder { /* private fields */ }Expand description
A builder for CommandCodeAttributes
Implementations
sourceimpl 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
sourceimpl Clone for CommandCodeAttributesBuilder
impl Clone for CommandCodeAttributesBuilder
sourcefn clone(&self) -> CommandCodeAttributesBuilder
fn clone(&self) -> CommandCodeAttributesBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for CommandCodeAttributesBuilder
impl Debug for CommandCodeAttributesBuilder
sourceimpl PartialEq<CommandCodeAttributesBuilder> for CommandCodeAttributesBuilder
impl PartialEq<CommandCodeAttributesBuilder> for CommandCodeAttributesBuilder
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &CommandCodeAttributesBuilder) -> bool
fn ne(&self, other: &CommandCodeAttributesBuilder) -> bool
This method tests for !=.
impl Copy for CommandCodeAttributesBuilder
impl Eq for CommandCodeAttributesBuilder
impl StructuralEq for CommandCodeAttributesBuilder
impl StructuralPartialEq for CommandCodeAttributesBuilder
Auto Trait Implementations
impl RefUnwindSafe for CommandCodeAttributesBuilder
impl Send for CommandCodeAttributesBuilder
impl Sync for CommandCodeAttributesBuilder
impl Unpin for CommandCodeAttributesBuilder
impl UnwindSafe for CommandCodeAttributesBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more