Trait lock_keys::LockKeyWrapper
source · pub trait LockKeyWrapper {
fn new() -> Self;
fn set(&self, key: LockKeys, state: LockKeyState) -> LockKeyResult;
fn enable(&self, key: LockKeys) -> LockKeyResult;
fn disable(&self, key: LockKeys) -> LockKeyResult;
fn toggle(&self, key: LockKeys) -> LockKeyResult;
fn state(&self, key: LockKeys) -> LockKeyResult;
}
Expand description
A collection of methods that are required for lock key handling.
Required Methods§
sourcefn set(&self, key: LockKeys, state: LockKeyState) -> LockKeyResult
fn set(&self, key: LockKeys, state: LockKeyState) -> LockKeyResult
Sets a new state for the lock key.
sourcefn enable(&self, key: LockKeys) -> LockKeyResult
fn enable(&self, key: LockKeys) -> LockKeyResult
Enables the lock key.
sourcefn disable(&self, key: LockKeys) -> LockKeyResult
fn disable(&self, key: LockKeys) -> LockKeyResult
Disables the lock key.
sourcefn toggle(&self, key: LockKeys) -> LockKeyResult
fn toggle(&self, key: LockKeys) -> LockKeyResult
Toggles the lock key state returning its previous one.
sourcefn state(&self, key: LockKeys) -> LockKeyResult
fn state(&self, key: LockKeys) -> LockKeyResult
Retrieves the lock key state.