pub struct PcrSelectionListBuilder { /* private fields */ }Expand description
A builder for the PcrSelectionList struct.
Implementations
sourceimpl PcrSelectionListBuilder
impl PcrSelectionListBuilder
pub fn new() -> Self
sourcepub fn with_size_of_select(self, size_of_select: PcrSelectSize) -> Self
pub fn with_size_of_select(self, size_of_select: PcrSelectSize) -> Self
Set the size of the pcr selection(sizeofSelect)
Arguments
size_of_select – The size that will be used for all selections(sizeofSelect).
sourcepub fn with_selection(
self,
hash_algorithm: HashingAlgorithm,
pcr_slots: &[PcrSlot]
) -> Self
pub fn with_selection(
self,
hash_algorithm: HashingAlgorithm,
pcr_slots: &[PcrSlot]
) -> Self
Adds a selection associated with a specific HashingAlgorithm.
This function will not overwrite the values already associated with a specific HashingAlgorithm only update.
Arguments
hash_algorithm – The HashingAlgorithm associated with the pcr selection pcr_slots – The PCR slots in the selection.
sourcepub fn build(self) -> Result<PcrSelectionList>
pub fn build(self) -> Result<PcrSelectionList>
Builds a PcrSelections with the values that have been provided.
If no size of select have been provided then it will be defaulted to to the most suitable with regard to TPM2_PCR_SELECT_MAX. This may not be the correct size for the current platform. The correct values can be obtained by querying the tpm for its capabilities.
Trait Implementations
sourceimpl Debug for PcrSelectionListBuilder
impl Debug for PcrSelectionListBuilder
sourceimpl Default for PcrSelectionListBuilder
impl Default for PcrSelectionListBuilder
sourcefn default() -> PcrSelectionListBuilder
fn default() -> PcrSelectionListBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for PcrSelectionListBuilder
impl Send for PcrSelectionListBuilder
impl Sync for PcrSelectionListBuilder
impl Unpin for PcrSelectionListBuilder
impl UnwindSafe for PcrSelectionListBuilder
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