Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin<T: ?Sized>: Default {
    // Required method
    fn apply_to(&self, target: &mut T) -> ProjectResult;

    // Provided method
    fn plugin_id(&self) -> &str { ... }
}
Expand description

A plugin to apply to the project. All plugins must implement default.

Required Methods§

Source

fn apply_to(&self, target: &mut T) -> ProjectResult

Apply the plugin

Provided Methods§

Source

fn plugin_id(&self) -> &str

The id of the plugin. A plugin of a certain ID can only added once

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§