Trait starnix_uapi::ownership::Releasable
source · 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§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<T: Releasable> Releasable for Option<T>
impl<T: Releasable> Releasable for Option<T>
Releasing an option calls release if the option is not empty.
source§impl<T: Releasable, E> Releasable for Result<T, E>
impl<T: Releasable, E> Releasable for Result<T, E>
Releasing a result calls release on the value if the result is ok.