pub trait Releasable {
type Context<'a>;
// Required method
fn release<'a>(self, c: Self::Context<'a>);
}Expand description
The base trait for explicit ownership. Any Releasable object must call release before
being dropped.
Required Associated Types§
Required Methods§
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.
Implementations on Foreign Types§
Source§impl<T: Releasable> Releasable for Option<T>
Releasing an option calls release if the option is not empty.
impl<T: Releasable> Releasable for Option<T>
Releasing an option calls release if the option is not empty.
Source§impl<T: Releasable> Releasable for Vec<T>
Releasing a vec calls release on each element
impl<T: Releasable> Releasable for Vec<T>
Releasing a vec calls release on each element
Source§impl<T: Releasable, E> Releasable for Result<T, E>
Releasing a result calls release on the value if the result is ok.
impl<T: Releasable, E> Releasable for Result<T, E>
Releasing a result calls release on the value if the result is ok.