pub struct App { /* private fields */ }Expand description
Top-level application orchestrator.
Implementations§
Source§impl App
impl App
Sourcepub fn add_plugin(
&self,
name: Option<&str>,
source: Option<String>,
backend: Option<PluginBackendKind>,
alias: Option<&str>,
) -> Result<RegistryEntry, CoreError>
pub fn add_plugin( &self, name: Option<&str>, source: Option<String>, backend: Option<PluginBackendKind>, alias: Option<&str>, ) -> Result<RegistryEntry, CoreError>
Adds a plugin to the local home.
Source§impl App
impl App
Sourcepub fn available_plugins(&self) -> Result<Vec<RegistryEntry>, CoreError>
pub fn available_plugins(&self) -> Result<Vec<RegistryEntry>, CoreError>
Lists plugins in the available registry index.
Sourcepub fn added_plugins(&self) -> Result<Vec<RegistryEntry>, CoreError>
pub fn added_plugins(&self) -> Result<Vec<RegistryEntry>, CoreError>
Lists plugins added to the local home.
Source§impl App
impl App
Source§impl App
impl App
Sourcepub fn list_config(&self) -> Result<Vec<(String, String)>, CoreError>
pub fn list_config(&self) -> Result<Vec<(String, String)>, CoreError>
Lists current application config values.
Sourcepub fn config_value(&self) -> Result<Value, CoreError>
pub fn config_value(&self) -> Result<Value, CoreError>
Returns the whole config as a YAML-like value.
Sourcepub fn config_entries_for_key(
&self,
key: &str,
) -> Result<Vec<(String, String)>, CoreError>
pub fn config_entries_for_key( &self, key: &str, ) -> Result<Vec<(String, String)>, CoreError>
Returns config entries for an exact key or section prefix.
Source§impl App
impl App
Sourcepub fn current_tool(
&self,
plugin_name: &str,
) -> Result<Option<CurrentTool>, CoreError>
pub fn current_tool( &self, plugin_name: &str, ) -> Result<Option<CurrentTool>, CoreError>
Resolves the active version for a specific plugin.
Sourcepub fn current_tools(&self) -> Result<Vec<CurrentTool>, CoreError>
pub fn current_tools(&self) -> Result<Vec<CurrentTool>, CoreError>
Resolves all active tools for the current context.
Source§impl App
impl App
Sourcepub fn plugin_info(&self, name: &str) -> Result<PluginInfo, CoreError>
pub fn plugin_info(&self, name: &str) -> Result<PluginInfo, CoreError>
Loads registry and backend metadata for a plugin.
Source§impl App
impl App
Sourcepub fn install_plugin_version(
&self,
plugin_name: &str,
version: Option<&str>,
) -> Result<InstalledVersion, CoreError>
pub fn install_plugin_version( &self, plugin_name: &str, version: Option<&str>, ) -> Result<InstalledVersion, CoreError>
Installs a plugin version, choosing the first available version when omitted.
Source§impl App
impl App
Sourcepub fn list_installed_versions(
&self,
) -> Result<Vec<InstalledVersion>, CoreError>
pub fn list_installed_versions( &self, ) -> Result<Vec<InstalledVersion>, CoreError>
Lists installed tool versions in the local cache.
Source§impl App
impl App
Sourcepub fn search_versions(
&self,
plugin_name: &str,
args: &[String],
) -> Result<Vec<AvailableVersion>, CoreError>
pub fn search_versions( &self, plugin_name: &str, args: &[String], ) -> Result<Vec<AvailableVersion>, CoreError>
Lists available SDK versions for a plugin.
Source§impl App
impl App
Sourcepub fn update_registry(&self) -> Result<usize, CoreError>
pub fn update_registry(&self) -> Result<usize, CoreError>
Refreshes the searchable plugin index from the configured registry source.
Sourcepub fn update_plugin(&self, name: &str) -> Result<RegistryEntry, CoreError>
pub fn update_plugin(&self, name: &str) -> Result<RegistryEntry, CoreError>
Updates a locally added plugin from its manifest URL or registry metadata.
Sourcepub fn update_all_plugins(&self) -> Result<Vec<RegistryEntry>, CoreError>
pub fn update_all_plugins(&self) -> Result<Vec<RegistryEntry>, CoreError>
Updates every locally added plugin.
Source§impl App
impl App
Sourcepub fn upgrade_self(&self) -> Result<SelfUpgradeSummary, CoreError>
pub fn upgrade_self(&self) -> Result<SelfUpgradeSummary, CoreError>
Upgrades the running vs binary to the latest published release.
Source§impl App
impl App
Sourcepub fn use_tool(
&self,
plugin_name: &str,
version: &str,
scope: UseScope,
unlink: bool,
) -> Result<InstalledVersion, CoreError>
pub fn use_tool( &self, plugin_name: &str, version: &str, scope: UseScope, unlink: bool, ) -> Result<InstalledVersion, CoreError>
Activates an installed tool version for a given scope.
Sourcepub fn installed_versions_for_plugin(
&self,
plugin_name: &str,
) -> Result<Vec<InstalledVersion>, CoreError>
pub fn installed_versions_for_plugin( &self, plugin_name: &str, ) -> Result<Vec<InstalledVersion>, CoreError>
Returns installed versions for a single plugin, sorted from newest-looking to oldest-looking.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
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,
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>
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>
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