pub trait ReleasableByMut {
    type Context<'a>;

    // Required method
    fn release<'a>(&mut 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§

source

type Context<'a>

Required Methods§

source

fn release<'a>(&mut self, c: Self::Context<'a>)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: ReleasableByMut> ReleasableByMut for Option<T>

Releasing an option calls release if the option is not empty.

§

type Context<'a> = <T as ReleasableByMut>::Context<'a>

source§

fn release<'a>(&mut self, c: Self::Context<'a>)

source§

impl<T: ReleasableByMut, E> ReleasableByMut for Result<T, E>

Releasing a result calls release on the value if the result is ok.

§

type Context<'a> = <T as ReleasableByMut>::Context<'a>

source§

fn release<'a>(&mut self, c: Self::Context<'a>)

Implementors§