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.
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.
Trait Implementations§
Source§impl Clone for FillTarget
impl Clone for FillTarget
Source§fn clone(&self) -> FillTarget
fn clone(&self) -> FillTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FillTarget
impl Debug for FillTarget
impl Eq for FillTarget
Source§impl PartialEq for FillTarget
impl PartialEq for FillTarget
impl StructuralPartialEq for FillTarget
Auto Trait Implementations§
impl Freeze for FillTarget
impl RefUnwindSafe for FillTarget
impl Send for FillTarget
impl Sync for FillTarget
impl Unpin for FillTarget
impl UnsafeUnpin for FillTarget
impl UnwindSafe for FillTarget
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.