Skip to main content

FillTarget

Enum FillTarget 

Source
pub enum FillTarget {
    Document,
    CommandLine,
    SearchLine,
    Prompt {
        buffer: u32,
    },
    PickerQuery,
    TransientArgument,
    Action {
        command: String,
    },
}
Expand description

YR.3: where a PickerAcceptOutcome::FillCaller puts its text.

Captured when the picker is opened, never resolved when it accepts. By accept time the picker has been dismissed and the modal state that identified the caller is gone; resolving then reads whatever context is current. In the single-level case that is usually the right answer, which is precisely the trap — it passes a naive test and fails in the picker-inside-a-prompt case the feature exists for. Effect::CursorMoveIn (name the buffer the position was computed in) and MG.32’s <CR> (ask the view before resolving the path) are the same shape, arrived at the same way.

Variants§

§

Document

Insert at the cursor in the buffer that was focused at open.

§

CommandLine

The : line.

§

SearchLine

The / or ? line.

§

Prompt

A one-line minibuffer prompt, named so a later prompt cannot receive text meant for the one that opened this picker.

Fields

§buffer: u32
§

PickerQuery

The query of the picker that was showing when this one opened — the M-y-inside-a-picker case.

§

TransientArgument

A transient menu’s argument, parked while this picker is up. MG.53.e’s case, folded in here rather than kept as a second mechanism: “which argument” is already recorded in the parked PendingTransientArgument, so this variant carries nothing.

§

Action

PC.11: an ex-command, which receives the value as its first argument.

The variant a plugin can name. Every target above is a host surface — a buffer, a line, a prompt, a menu, another picker — and a guest owns none of them. It owns an ex-command, so that is what it gets to point at. Effect::OpenPrompt’s on_submit_action is the same idea for prompts, and this closes the gap where a guest could be handed a prompt’s answer but not a picker’s.

Carries the command NAME rather than a resolved CommandId: the target is captured at open (see this type’s own doc), and resolving then would pin an id the registry could have re-issued by accept time. Resolution happens where the value is delivered, which is also where “no such command” can be reported to someone who can act on it.

Fields

§command: String

Trait Implementations§

Source§

impl Clone for FillTarget

Source§

fn clone(&self) -> FillTarget

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FillTarget

Source§

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

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

impl Eq for FillTarget

Source§

impl PartialEq for FillTarget

Source§

fn eq(&self, other: &FillTarget) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FillTarget

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more