pub trait ClosableKvBackend: KvBackend<Error = Error> {
// Required method
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A KvBackend holding resources that must be released explicitly on shutdown, because components sharing it may keep it alive until the process exits.
Wrappers of a closable backend must forward ClosableKvBackend::close to it.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".