Skip to main content

NamedMutator

Trait NamedMutator 

Source
pub trait NamedMutator<C> {
    // Required methods
    fn name(&self) -> &'static str;
    fn mutator(&self) -> Mutator<C>;
    fn reencode(&self, args: Option<&Value>) -> Result<Option<Value>, String>;
}
Expand description

A named mutator whatever its types: for a list of an app’s mutators, to register them all and to check them against the TS definitions.

Required Methods§

Source

fn name(&self) -> &'static str

Its name in the TS mutator registry.

Source

fn mutator(&self) -> Mutator<C>

Source

fn reencode(&self, args: Option<&Value>) -> Result<Option<Value>, String>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<A, C, O> NamedMutator<C> for MutatorDefinition<A, C, O>
where A: Serialize + DeserializeOwned + 'static, C: 'static, O: Serialize + 'static,