pub struct CliLoader { /* private fields */ }Expand description
Loader for share-dir, installed and -e extensions (builtin: test components).
Implementations§
Source§impl CliLoader
impl CliLoader
Sourcepub fn new(sources: &[String], context: &LoaderContext) -> Self
pub fn new(sources: &[String], context: &LoaderContext) -> Self
Resolves the package set; unknown -e sources become Failed to load extension errors.
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Problems found while resolving sources.
Sourcepub fn load_errors(&self) -> Vec<Diagnostic>
pub fn load_errors(&self) -> Vec<Diagnostic>
Component load failures from the last ExtensionLoader::load (warnings).
Trait Implementations§
Source§impl ExtensionLoader for CliLoader
impl ExtensionLoader for CliLoader
Source§fn load(
&self,
host: Arc<dyn HostApi>,
project_trusted: bool,
) -> BoxFuture<'_, Vec<Arc<dyn ExtensionInstance>>>
fn load( &self, host: Arc<dyn HostApi>, project_trusted: bool, ) -> BoxFuture<'_, Vec<Arc<dyn ExtensionInstance>>>
Loads every enabled instance in discovery order.
host is what the instances call back
into; project_trusted gates .oino/extensions.Source§fn load_enabled<'a>(
&'a self,
host: Arc<dyn HostApi>,
project_trusted: bool,
disabled: &'a [String],
) -> BoxFuture<'a, Vec<Arc<dyn ExtensionInstance>>>
fn load_enabled<'a>( &'a self, host: Arc<dyn HostApi>, project_trusted: bool, disabled: &'a [String], ) -> BoxFuture<'a, Vec<Arc<dyn ExtensionInstance>>>
ExtensionLoader::load without the extensions listed in disabledExtensions.
Loaders that can skip packages before instantiating them override this; the default
loads everything and Services::create drops the disabled instances before init.Auto Trait Implementations§
impl !Freeze for CliLoader
impl !RefUnwindSafe for CliLoader
impl !UnwindSafe for CliLoader
impl Send for CliLoader
impl Sync for CliLoader
impl Unpin for CliLoader
impl UnsafeUnpin for CliLoader
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 moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.