Trait dispose::DisposeWith [−][src]
pub trait DisposeWith<W> {
fn dispose_with(self, with: W);
}Expand description
A helper trait for objects that must be consumed with the help of another value.
If the method to consume a value is an associated function or requires additional arguments that cannot be determined at compile-time, this trait provides a simple way to implement Dispose for any container that has both the value to be disposed and any other values necessary, as demonstrated with this implementation for pairs.
Required methods
fn dispose_with(self, with: W)
fn dispose_with(self, with: W)
Dispose self, using the provided value.