Trait Plugin

Source
pub trait Plugin<T>: Default
where T: ?Sized,
{ // Required method fn apply_to(&self, target: &mut T) -> Result<(), PayloadError<ProjectError>>; // 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) -> Result<(), PayloadError<ProjectError>>

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", so this trait is not object safe.

Implementors§