ExtensionManagementService

Trait ExtensionManagementService 

Source
pub trait ExtensionManagementService:
    Environment
    + Send
    + Sync {
    // Required methods
    fn ScanForExtensions<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn GetExtensions<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Value>, CommonError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn GetExtension<'life0, 'async_trait>(
        &'life0 self,
        ExtensionID: String,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

An abstract service contract for an environment component that can discover, parse, and provide information about installed extensions.

Required Methods§

Source

fn ScanForExtensions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Scans the predefined extension directories, parses the package.json for each found extension, and populates the internal state with the results.

This is typically a long-running operation that should be performed during application startup.

Source

fn GetExtensions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Value>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves the metadata for all successfully scanned extensions.

§Returns

A Result containing a Vec<Value>, where each Value is a JSON object representing an extension’s package.json content.

Source

fn GetExtension<'life0, 'async_trait>( &'life0 self, ExtensionID: String, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, CommonError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves the metadata for a single extension, identified by its ID (e.g., “vscode.typescript-language-features”).

§Parameters
  • ExtensionID: The unique identifier of the extension to retrieve.
§Returns

A Result containing an Option<Value>. Some(Value) if the extension was found, None otherwise.

Implementors§