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§
Sourcefn transform(&mut self, t: &Transformation) -> &mut Self
fn transform(&mut self, t: &Transformation) -> &mut Self
Applies a transformation to self
.
Provided Methods§
Sourcefn transform_clone(&self, t: &Transformation) -> Self
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.