Trait Transformable

Source
pub trait Transformable: Clone {
    // Required method
    fn transform(&mut self, t: &Transformation) -> &mut Self;

    // Provided method
    fn transform_clone(&self, t: &Transformation) -> Self { ... }
}
Expand description

Trait for types that can modify themselves by a Transformation.

Required Methods§

Source

fn transform(&mut self, t: &Transformation) -> &mut Self

Applies a transformation to self.

Provided Methods§

Source

fn transform_clone(&self, t: &Transformation) -> Self

Applies a transformation to a clone.

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§