pub struct ProtectedWatchdog { /* private fields */ }Expand description
Protected Watchdog that runs inside TEE
Implementations§
Source§impl ProtectedWatchdog
impl ProtectedWatchdog
Sourcepub fn new(platform: TeePlatform) -> Self
pub fn new(platform: TeePlatform) -> Self
Create a new protected watchdog
Sourcepub fn initialize(&mut self) -> Result<(), EnclaveError>
pub fn initialize(&mut self) -> Result<(), EnclaveError>
Initialize the protected watchdog
Sourcepub fn record_violation(&mut self) -> Result<u32, EnclaveError>
pub fn record_violation(&mut self) -> Result<u32, EnclaveError>
Record a violation (runs inside enclave)
Sourcepub fn check_action(&mut self, _action: &str) -> Result<bool, EnclaveError>
pub fn check_action(&mut self, _action: &str) -> Result<bool, EnclaveError>
Check if action is allowed (runs inside enclave)
Sourcepub fn get_attestation(
&mut self,
challenge: &[u8; 32],
) -> Result<AttestationReport, EnclaveError>
pub fn get_attestation( &mut self, challenge: &[u8; 32], ) -> Result<AttestationReport, EnclaveError>
Get attestation proof
Sourcepub fn violation_count(&self) -> u32
pub fn violation_count(&self) -> u32
Get violation count
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProtectedWatchdog
impl RefUnwindSafe for ProtectedWatchdog
impl Send for ProtectedWatchdog
impl Sync for ProtectedWatchdog
impl Unpin for ProtectedWatchdog
impl UnwindSafe for ProtectedWatchdog
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