Skip to main content

Step

Enum Step 

Source
pub enum Step<'a, A> {
    Fired(&'a A),
    Pending,
    PassThrough(Vec<KeyInput>),
}
Expand description

What a PendingSequence::feed resolved to — the caller’s next action.

Step is the action-oriented dual of Match: where Match states a fact about the table (exact / prefix / miss), Step states what the caller does (fire it / keep waiting / take these keys back). The trichotomy is the same closed set — feed is a thin translation of the SequenceKeymap::lookup result into buffer operations, and a pure trie lookup has no fourth outcome — so, like Match, this enum is not #[non_exhaustive]: match all three arms and let the compiler check coverage. (flush’s drain is a Vec, not a Step, so it adds no variant.)

Variants§

§

Fired(&'a A)

The buffer completed a binding, resolving to this action; the buffer has been cleared.

§

Pending

The buffer is a proper prefix of a longer binding; it has been kept. Keep reading (and, for a timed binding, (re)start your idle timer).

§

PassThrough(Vec<KeyInput>)

The buffer is not on any binding path; it has been cleared and its keys — every key buffered so far, in order — are handed back for the caller to handle.

Trait Implementations§

Source§

impl<'a, A: Debug> Debug for Step<'a, A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, A: Eq> Eq for Step<'a, A>

Source§

impl<'a, A: PartialEq> PartialEq for Step<'a, A>

Source§

fn eq(&self, other: &Step<'a, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, A> StructuralPartialEq for Step<'a, A>

Auto Trait Implementations§

§

impl<'a, A> Freeze for Step<'a, A>

§

impl<'a, A> RefUnwindSafe for Step<'a, A>
where A: RefUnwindSafe,

§

impl<'a, A> Send for Step<'a, A>
where A: Sync,

§

impl<'a, A> Sync for Step<'a, A>
where A: Sync,

§

impl<'a, A> Unpin for Step<'a, A>

§

impl<'a, A> UnsafeUnpin for Step<'a, A>

§

impl<'a, A> UnwindSafe for Step<'a, A>
where A: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.