Struct tss_esapi::structures::pcr_select::PcrSelect
source · pub struct PcrSelect { /* private fields */ }
Expand description
This module contains necessary representations of the items belonging to the TPMS_PCR_SELECT structure.
The minimum number of octets allowed in a TPMS_PCR_SELECT.sizeOfSelect is not determined by the number of PCR implemented but by the number of PCR required by the platform-specific specification with which the TPM is compliant or by the implementer if not adhering to a platform-specific specification.
Implementations§
source§impl PcrSelect
impl PcrSelect
sourcepub fn create(
pcr_select_size: PcrSelectSize,
pcr_slots: &[PcrSlot]
) -> Result<Self>
pub fn create( pcr_select_size: PcrSelectSize, pcr_slots: &[PcrSlot] ) -> Result<Self>
Creates a new PcrSelect
sourcepub fn size_of_select(&self) -> PcrSelectSize
pub fn size_of_select(&self) -> PcrSelectSize
Returns the size of the select.
NB! This is not the same as how many PcrSlot there are in the select but rather how many octets that are needed to hold the bit field that indicate what slots that are selected.
sourcepub fn selected_pcrs(&self) -> Vec<PcrSlot>
pub fn selected_pcrs(&self) -> Vec<PcrSlot>
Returns the selected PCRs in the select.
Trait Implementations§
source§impl From<PcrSelect> for TPMS_PCR_SELECT
impl From<PcrSelect> for TPMS_PCR_SELECT
source§impl PartialEq for PcrSelect
impl PartialEq for PcrSelect
source§impl TryFrom<TPMS_PCR_SELECT> for PcrSelect
impl TryFrom<TPMS_PCR_SELECT> for PcrSelect
impl Copy for PcrSelect
impl Eq for PcrSelect
impl StructuralPartialEq for PcrSelect
Auto Trait Implementations§
impl Freeze for PcrSelect
impl RefUnwindSafe for PcrSelect
impl Send for PcrSelect
impl Sync for PcrSelect
impl Unpin for PcrSelect
impl UnwindSafe for PcrSelect
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