pub struct SourceRegistry { /* private fields */ }Expand description
Registry of completion sources
Manages registered sources and provides access by ID.
Implementations§
Source§impl SourceRegistry
impl SourceRegistry
Sourcepub fn register(&mut self, source: Arc<dyn SourceSupport>)
pub fn register(&mut self, source: Arc<dyn SourceSupport>)
Register a completion source
Sources are stored in priority order (lower priority value = earlier).
Sourcepub fn sources(&self) -> &[Arc<dyn SourceSupport>]
pub fn sources(&self) -> &[Arc<dyn SourceSupport>]
Get all registered sources
Sourcepub fn available_sources(
&self,
ctx: &CompletionContext,
) -> Vec<Arc<dyn SourceSupport>>
pub fn available_sources( &self, ctx: &CompletionContext, ) -> Vec<Arc<dyn SourceSupport>>
Get available sources for a context
Sourcepub fn all_trigger_characters(&self) -> Vec<char>
pub fn all_trigger_characters(&self) -> Vec<char>
Get all trigger characters from all sources
Trait Implementations§
Source§impl Debug for SourceRegistry
impl Debug for SourceRegistry
Source§impl Default for SourceRegistry
impl Default for SourceRegistry
Source§fn default() -> SourceRegistry
fn default() -> SourceRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SourceRegistry
impl !RefUnwindSafe for SourceRegistry
impl Send for SourceRegistry
impl Sync for SourceRegistry
impl Unpin for SourceRegistry
impl !UnwindSafe for SourceRegistry
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more