pub trait AsyncPluginHandler: Send + Sync + 'static {
    type Configuration: Serialize + Clone + Send + Sync;

    // Required methods
    fn resolve_config(
        &self,
        config: ConfigKeyMap,
        global_config: GlobalConfiguration
    ) -> ResolveConfigurationResult<Self::Configuration>;
    fn plugin_info(&self) -> PluginInfo;
    fn license_text(&self) -> String;
    fn format(
        &self,
        request: FormatRequest<Self::Configuration>,
        host: Arc<dyn Host>
    ) -> BoxFuture<'_, FormatResult>;
}
Expand description

Trait for implementing a process plugin. Wasm plugins will eventually be changed to implement this.

Required Associated Types§

Required Methods§

source

fn resolve_config( &self, config: ConfigKeyMap, global_config: GlobalConfiguration ) -> ResolveConfigurationResult<Self::Configuration>

Resolves configuration based on the provided config map and global configuration.

source

fn plugin_info(&self) -> PluginInfo

Gets the plugin’s plugin info.

source

fn license_text(&self) -> String

Gets the plugin’s license text.

source

fn format( &self, request: FormatRequest<Self::Configuration>, host: Arc<dyn Host> ) -> BoxFuture<'_, FormatResult>

Formats the provided file text based on the provided file path and configuration.

Implementors§