pub trait EditConnectionCostPlugin: Sync + Send {
// Required methods
fn set_up(
&mut self,
settings: &Value,
config: &Config,
grammar: &Grammar<'_>,
) -> SudachiResult<()>;
fn edit(&self, grammar: &mut Grammar<'_>);
}
Expand description
Trait of plugin to edit connection cost in the grammar
Required Methods§
Trait Implementations§
source§impl PluginCategory for dyn EditConnectionCostPlugin
impl PluginCategory for dyn EditConnectionCostPlugin
source§type BoxType = Box<dyn EditConnectionCostPlugin + Sync + Send>
type BoxType = Box<dyn EditConnectionCostPlugin + Sync + Send>
Boxed type of the plugin. Should be Box.
source§type InitFnType = unsafe fn() -> Result<<dyn EditConnectionCostPlugin as PluginCategory>::BoxType, SudachiError>
type InitFnType = unsafe fn() -> Result<<dyn EditConnectionCostPlugin as PluginCategory>::BoxType, SudachiError>
Type of the initialization function.
It must take 0 arguments and return
SudachiResult<Self::BoxType>
.source§fn configurations(cfg: &Config) -> &[Value]
fn configurations(cfg: &Config) -> &[Value]
Extract plugin configurations from the config