pub struct ActiveCompletionSources(pub Vec<CompletionSourceContribution>);Expand description
Cached active completion-
source set for a buffer. The host
(App::recompute_active_completion_sources_for) recomputes
this on every mode-activation / -deactivation transition by
walking active_modes and calling
mode.completion_sources() on each. The aggregator reads
the cache on the popup-open / refilter path – O(1) buffer-
local lookup, never a walk over every active mode per
keystroke (CSM.3, insert-completion.md §12.4).
OWNER_MODE is "completion-mode" because that’s the
persistent gate; the cache is meaningless when
completion-mode is inactive (read-only buffers never
trigger the popup, never need the cache).
Tuple Fields§
§0: Vec<CompletionSourceContribution>Trait Implementations§
Source§impl BufferLocal for ActiveCompletionSources
impl BufferLocal for ActiveCompletionSources
Source§const NAME: &'static str = "completion-mode.active-sources"
const NAME: &'static str = "completion-mode.active-sources"
Public display name (
:describe-buffer row label,
debug logs). Convention: <owner-mode-name>.<key>,
e.g. "file-tree.entries". Not a registry key — locals
aren’t registered globally; the name is metadata for
inspection.Source§const DOC: &'static str = "Cached active insert-completion source set for this \
buffer. Recomputed on every mode-activation / \
-deactivation transition; read by the aggregator on \
the popup-open / refilter path."
const DOC: &'static str = "Cached active insert-completion source set for this \ buffer. Recomputed on every mode-activation / \ -deactivation transition; read by the aggregator on \ the popup-open / refilter path."
Doc string. Shown in
:describe-buffer when the user
expands a local for detail.Source§const OWNER_MODE: &'static str = "completion-mode"
const OWNER_MODE: &'static str = "completion-mode"
Mode id that owns this local. Attribution metadata for
:describe-buffer; the write-time check the design calls for
(a ModeContext::set_local::<T> that rejects a non-owner) is not
implemented, so nothing enforces it today (see the module docs).Source§impl Clone for ActiveCompletionSources
impl Clone for ActiveCompletionSources
Source§fn clone(&self) -> ActiveCompletionSources
fn clone(&self) -> ActiveCompletionSources
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActiveCompletionSources
impl Debug for ActiveCompletionSources
Source§impl Default for ActiveCompletionSources
impl Default for ActiveCompletionSources
Source§fn default() -> ActiveCompletionSources
fn default() -> ActiveCompletionSources
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ActiveCompletionSources
impl !UnwindSafe for ActiveCompletionSources
impl Freeze for ActiveCompletionSources
impl Send for ActiveCompletionSources
impl Sync for ActiveCompletionSources
impl Unpin for ActiveCompletionSources
impl UnsafeUnpin for ActiveCompletionSources
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