pub struct TimeDelayedRecoveryManager { /* private fields */ }Expand description
Time-delayed recovery manager
Implementations§
Source§impl TimeDelayedRecoveryManager
impl TimeDelayedRecoveryManager
Sourcepub fn new(config: TimeDelayedRecoveryConfig) -> Self
pub fn new(config: TimeDelayedRecoveryConfig) -> Self
Create a new time-delayed recovery manager
Sourcepub async fn create_recovery_key(
&self,
derivation_path: String,
) -> Result<RecoveryKey>
pub async fn create_recovery_key( &self, derivation_path: String, ) -> Result<RecoveryKey>
Create a new recovery key
Sourcepub async fn is_recovery_available(&self, recovery_id: &str) -> Result<bool>
pub async fn is_recovery_available(&self, recovery_id: &str) -> Result<bool>
Check if a recovery key is available for use
Sourcepub async fn use_recovery_key(&self, recovery_id: &str) -> Result<RecoveryKey>
pub async fn use_recovery_key(&self, recovery_id: &str) -> Result<RecoveryKey>
Use a recovery key (mark as used)
Sourcepub async fn time_until_recovery(&self, recovery_id: &str) -> Result<Duration>
pub async fn time_until_recovery(&self, recovery_id: &str) -> Result<Duration>
Get time remaining until recovery is available
Auto Trait Implementations§
impl Freeze for TimeDelayedRecoveryManager
impl !RefUnwindSafe for TimeDelayedRecoveryManager
impl Send for TimeDelayedRecoveryManager
impl Sync for TimeDelayedRecoveryManager
impl Unpin for TimeDelayedRecoveryManager
impl !UnwindSafe for TimeDelayedRecoveryManager
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