pub struct MeasurementMgr { /* private fields */ }Expand description
Responsible for storing all software components measurements and performing
the read_measurement and extend_measurement functions.
Implementations§
Source§impl MeasurementMgr
impl MeasurementMgr
Sourcepub fn init(
boot_measurements: Vec<BootMeasurement>,
) -> Result<MeasurementMgr, MeasurementError>
pub fn init( boot_measurements: Vec<BootMeasurement>, ) -> Result<MeasurementMgr, MeasurementError>
Initializes with BootMeasurements repacked and stores as Measurement slots.
Sourcepub fn read_measurement(
&self,
slot_id: usize,
) -> Result<(&Measurement, bool), MeasurementError>
pub fn read_measurement( &self, slot_id: usize, ) -> Result<(&Measurement, bool), MeasurementError>
Returns measurement metadata, value and locked attribute from given slot_id.
Returns MeasurementError::InvalidArgument, when slot_id is out of bounds.
Returns MeasurementError::DoesNotExist, when is not populated.
Sourcepub fn extend_measurement(
&mut self,
slot_id: usize,
measurement: Measurement,
lock: bool,
) -> Result<(), MeasurementError>
pub fn extend_measurement( &mut self, slot_id: usize, measurement: Measurement, lock: bool, ) -> Result<(), MeasurementError>
Extends measurement with updated metadata, value and locked attribute in given slot_id.
Returns MeasurementError::InvalidArgument, when slot_id is out of bounds.
Returns MeasurementError::BadState, when measurement is locked.
Returns MeasurementError::NotPermitted, when measurements signer id’s
and algorithm do not match.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MeasurementMgr
impl RefUnwindSafe for MeasurementMgr
impl Send for MeasurementMgr
impl Sync for MeasurementMgr
impl Unpin for MeasurementMgr
impl UnsafeUnpin for MeasurementMgr
impl UnwindSafe for MeasurementMgr
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