Affectable

Trait Affectable 

Source
pub trait Affectable<T, F: Effect<T>> {
    // Required method
    fn apply(self, effect: &F) -> Self;
}
Expand description

Defines something that can be affected.

This is auto-implemented for any T and F where F is an effect that can be applied on T.

As a result it should almost never be implemented directly, like Into<T> in the standard library.

Required Methods§

Source

fn apply(self, effect: &F) -> Self

Applies an effect on self.

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§

Source§

impl<T, F> Affectable<T, F> for T
where F: Effect<T>,