Struct modalkit::env::emacs::EmacsState
source · pub struct EmacsState<I: ApplicationInfo = EmptyInfo> { /* private fields */ }
Expand description
This wraps both action specific context, and persistent context.
Trait Implementations§
source§impl<I: ApplicationInfo> Clone for EmacsState<I>
impl<I: ApplicationInfo> Clone for EmacsState<I>
source§impl<I: Debug + ApplicationInfo> Debug for EmacsState<I>
impl<I: Debug + ApplicationInfo> Debug for EmacsState<I>
source§impl<I: ApplicationInfo> Default for EmacsState<I>
impl<I: ApplicationInfo> Default for EmacsState<I>
source§impl<I: ApplicationInfo> From<EmacsState<I>> for EditContext
impl<I: ApplicationInfo> From<EmacsState<I>> for EditContext
source§fn from(ctx: EmacsState<I>) -> Self
fn from(ctx: EmacsState<I>) -> Self
Converts to this type from the input type.
source§impl<I: ApplicationInfo> InputKeyState<TerminalKey, CommonKeyClass> for EmacsState<I>
impl<I: ApplicationInfo> InputKeyState<TerminalKey, CommonKeyClass> for EmacsState<I>
source§fn event(
&mut self,
ev: &EdgeEvent<TerminalKey, CommonKeyClass>,
ke: &TerminalKey
)
fn event( &mut self, ev: &EdgeEvent<TerminalKey, CommonKeyClass>, ke: &TerminalKey )
Update the context as needed after a
Key
has matched an EdgeEvent.source§fn get_cursor_indicator(&self) -> Option<char>
fn get_cursor_indicator(&self) -> Option<char>
Return a character to show at the current cursor position.
source§impl<I: ApplicationInfo> InputState for EmacsState<I>
impl<I: ApplicationInfo> InputState for EmacsState<I>
§type Output = EditContext
type Output = EditContext
The output context type returned along with actions.
source§fn merge(original: EditContext, overrides: &EditContext) -> EditContext
fn merge(original: EditContext, overrides: &EditContext) -> EditContext
Copy any overriding values into an
Output
object.source§impl<I: ApplicationInfo> Mode<Action<I>, EmacsState<I>> for EmacsMode
impl<I: ApplicationInfo> Mode<Action<I>, EmacsState<I>> for EmacsMode
source§impl<I: ApplicationInfo> ModeKeys<TerminalKey, Action<I>, EmacsState<I>> for EmacsMode
impl<I: ApplicationInfo> ModeKeys<TerminalKey, Action<I>, EmacsState<I>> for EmacsMode
source§fn unmapped(
&self,
ke: &TerminalKey,
ctx: &mut EmacsState<I>
) -> (Vec<Action<I>>, Option<Self>)
fn unmapped( &self, ke: &TerminalKey, ctx: &mut EmacsState<I> ) -> (Vec<Action<I>>, Option<Self>)
Return the default behaviour for the current mode when the given key is unmapped. Read more
source§impl<I: ApplicationInfo> ModeSequence<RepeatType, Action<I>, EmacsState<I>> for EmacsMode
impl<I: ApplicationInfo> ModeSequence<RepeatType, Action<I>, EmacsState<I>> for EmacsMode
source§fn sequences(
&self,
action: &Action<I>,
ctx: &EditContext
) -> Vec<(RepeatType, SequenceStatus)>
fn sequences( &self, action: &Action<I>, ctx: &EditContext ) -> Vec<(RepeatType, SequenceStatus)>
Controls how and what gets included in the sequences of actions tracked by
ModalMachine. When implementing, if there are actions that trigger calls to
BindingMachine::repeat, be careful that they do not get included in a way that can
create cycles. Read more
source§impl<I: PartialEq + ApplicationInfo> PartialEq for EmacsState<I>
impl<I: PartialEq + ApplicationInfo> PartialEq for EmacsState<I>
source§fn eq(&self, other: &EmacsState<I>) -> bool
fn eq(&self, other: &EmacsState<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<I: Eq + ApplicationInfo> Eq for EmacsState<I>
impl<I: ApplicationInfo> StructuralPartialEq for EmacsState<I>
Auto Trait Implementations§
impl<I> Freeze for EmacsState<I>
impl<I> RefUnwindSafe for EmacsState<I>where
I: RefUnwindSafe,
impl<I> Send for EmacsState<I>where
I: Send,
impl<I> Sync for EmacsState<I>where
I: Sync,
impl<I> Unpin for EmacsState<I>where
I: Unpin,
impl<I> UnwindSafe for EmacsState<I>where
I: UnwindSafe,
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