pub trait Discard {
// Provided method
fn discard(&self) { ... }
}Expand description
A trait for discarding a value.
It is useful when you want a short closure:
ⓘ
let x = Square::new(1.0).with(|x| {
x.set_color(manim::BLUE_C);
});
let x = Square::new(1.0).with(|x|
x.set_color(manim::BLUE_C).discard()
);Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".