pub struct PcrSelection { /* private fields */ }
Expand description

This module contains the PcrSelection struct. The TSS counterpart of this struct is the TPMS_PCR_SELECTION.

Implementations

Creates new PcrSelection

Errors

Returns InconsistentParams error if a pcr slot has been provided that ends up in an octet outside the range specified by the size_of_select parameter.

Returns the hashing algorithm for the selection

Returns ‘Size of Select’

NB! This is not the same as how many PcrSlot there are in the selection but rather how many octets that are needed to hold the bit field that indicate what slots that are selected.

Returns the selected pcrs.

Returns true if the specified PcrSlot is selected in the PcrSelection.

Removes the specified PcrSlots from the selected pcrs.

Errors

If one of the specified pcr slots does not exist in the selected pcrs.

Removes the specified PcrSlots from the selected pcrs.

Merges another PcrSelection into self if the elements in the collection does not already exist in self.

Constraints
  • Cannot be called with other that has a hashing_algorithm that is different from the one in self.
  • Cannot be called with other that has a size_of_select that is different from the one in self.
  • Cannot be called with otherthat contains pcr slots present in self.
Errors

Returns InvalidParam if there is a hashing algorithm mismatch Returns InvalidParam if there is size of select mismatch. Returns InvalidParam if other contains items that are present in self

Removes the selected pcr slots in other from selfif none of the pcr slots are present in self.

Constraints
  • Cannot be called with other that has a hashing_algorithm that is different from the one in self.
  • Cannot be called with other that has a size_of_select that is different from the one in self.
  • Cannot be called with otherthat contains pcr slots not present in self.

Indicates whether the pcr selection is empty.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Drops the content pointed by this pointer and frees it. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.