pub struct SettingsLockManager { /* private fields */ }Expand description
Manages PIN-based settings locking.
Implementations§
Source§impl SettingsLockManager
impl SettingsLockManager
pub fn new() -> Self
pub fn with_hasher(self, hasher: impl PinHasher + 'static) -> Self
pub fn with_min_pin_length(self, length: usize) -> Self
pub fn load_state(&self, data: &[u8]) -> Result<(), SettingsError>
pub fn save_state(&self) -> Result<Vec<u8>, SettingsError>
pub fn is_lock_enabled(&self) -> bool
pub fn is_locked(&self) -> bool
pub fn enable_lock(&self, pin: &str) -> Result<(), SettingsError>
pub fn disable_lock(&self, pin: &str) -> Result<(), SettingsError>
pub fn validate_pin(&self, pin: &str) -> Result<bool, SettingsError>
pub fn unlock(&self, pin: &str) -> Result<(), SettingsError>
pub fn lock(&self)
pub fn set_timeout(&self, timeout_ms: u64)
pub fn change_pin( &self, current_pin: &str, new_pin: &str, ) -> Result<(), SettingsError>
pub fn has_pin_set(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SettingsLockManager
impl !RefUnwindSafe for SettingsLockManager
impl !UnwindSafe for SettingsLockManager
impl Send for SettingsLockManager
impl Sync for SettingsLockManager
impl Unpin for SettingsLockManager
impl UnsafeUnpin for SettingsLockManager
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