[−][src]Trait dispose::DisposeWith
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)
Dispose self, using the provided value.
Implementations on Foreign Types
impl<W, T> DisposeWith<W> for Vec<T> where
Vec<T>: DisposeIteratorWith<W>,
[src]
Vec<T>: DisposeIteratorWith<W>,
fn dispose_with(self, with: W)
[src]
impl<W, T> DisposeWith<W> for Box<[T]> where
Vec<T>: DisposeIteratorWith<W>,
[src]
Vec<T>: DisposeIteratorWith<W>,
fn dispose_with(self, with: W)
[src]
impl<'a, W, T> DisposeWith<W> for &'a [T] where
&'a [T]: DisposeIteratorWith<W>,
[src]
&'a [T]: DisposeIteratorWith<W>,
fn dispose_with(self, with: W)
[src]
Implementors
impl<W, F: FnOnce(W)> DisposeWith<W> for F
[src]
fn dispose_with(self, with: W)
[src]
Run the closure with the given parameter, consuming both.