pub struct Context {
pub active_layers: [bool; 8],
}
Expand description
crate::key::Context for LayeredKey that tracks active layers.
Fields§
§active_layers: [bool; 8]
The active layers.
Implementations§
Source§impl Context
impl Context
Sourcepub fn activate_layer(&mut self, layer: LayerIndex)
pub fn activate_layer(&mut self, layer: LayerIndex)
Activate the given layer.
Sourcepub fn layer_state(&self) -> &[bool; 8]
pub fn layer_state(&self) -> &[bool; 8]
Get the active layers.
Sourcepub fn handle_event(&mut self, event: LayerEvent)
pub fn handle_event(&mut self, event: LayerEvent)
Updates the context with the LayerEvent.
Trait Implementations§
impl Copy for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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