Trait starnix_uapi::ownership::ReleasableByRef
source · pub trait ReleasableByRef {
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: ReleasableByRef> ReleasableByRef for Option<T>
impl<T: ReleasableByRef> ReleasableByRef for Option<T>
Releasing an option calls release if the option is not empty.
source§impl<T: ReleasableByRef, E> ReleasableByRef for Result<T, E>
impl<T: ReleasableByRef, E> ReleasableByRef for Result<T, E>
Releasing a result calls release on the value if the result is ok.