Discard

Trait Discard 

Source
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§

Source

fn discard(&self)

Simply returns ()

Implementors§

Source§

impl<T> Discard for T