pub enum OpState {
Resting,
Awaiting {
op: Operator,
count: u32,
},
AwaitingSearch {
op: Operator,
count: u32,
},
}Expand description
Re-exported from escriba_mode, which now OWNS the operator-pending FSM.
It moved down in 0.1.68 because it only ever needed escriba-core +
zenmai; keeping it here meant a consumer had to depend on the entire
editor to compose d with w. This re-export is deliberate rather than a
deprecation shim: escriba_runtime::OpState is the spelling every existing
consumer and test uses, and a path change would be a breaking one for no
gain.
Operator-pending state. Resting = normal; Awaiting { op, count } = an
operator key was pressed (with count, default 1) and the next motion will
be operated over.
Variants§
Resting
Awaiting
AwaitingSearch
d/ — an operator is armed AND a search prompt is open.
Without this state the prompt’s own keys (the typed pattern, Backspace,
history) hit the “anything else cancels” arm and the operator
evaporated on the very first character, so d/foo<CR> silently did
nothing. The operator has to survive an arbitrary number of keystrokes
here, which is exactly why it needs a state rather than a guard.
Trait Implementations§
impl Copy for OpState
impl Eq for OpState
impl StructuralPartialEq for OpState
Auto Trait Implementations§
impl Freeze for OpState
impl RefUnwindSafe for OpState
impl Send for OpState
impl Sync for OpState
impl Unpin for OpState
impl UnsafeUnpin for OpState
impl UnwindSafe for OpState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.