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§
Sourcefn ScanForExtensions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CommonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Sourcefn 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 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.