pub trait SyncPluginHandler<TConfiguration: Clone + Serialize> {
    fn resolve_config(
        &mut self,
        config: ConfigKeyMap,
        global_config: &GlobalConfiguration
    ) -> ResolveConfigurationResult<TConfiguration>; fn plugin_info(&mut self) -> PluginInfo; fn license_text(&mut self) -> String; fn format(
        &mut self,
        file_path: &Path,
        file_text: &str,
        config: &TConfiguration,
        format_with_host: impl FnMut(&Path, String, &ConfigKeyMap) -> FormatResult
    ) -> FormatResult; }
Expand description

Trait for implementing a Wasm plugin. Eventually this will be combined with AsyncPluginHandler.

Required methods

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

Gets the plugin’s plugin info.

Gets the plugin’s license text.

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

Implementors