Skip to main content

StorageDriver

Trait StorageDriver 

Source
pub trait StorageDriver {
    // Required method
    async fn flush(&self);

    // Provided method
    async fn run(&self) { ... }
}
Expand description

Sink dirty information-base state is flushed into.

Required Methods§

Source

async fn flush(&self)

Persists all information-base fields modified since the last call.

Provided Methods§

Source

async fn run(&self)

Persists information-base changes as they happen, until cancelled.

Drivers that write in the background implement this; the default never completes, so a caller can drive any driver the same way.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: StorageDriver> StorageDriver for &T

Lets a driver be shared: the stack can hold a reference to one the application also flushes itself.

Source§

async fn flush(&self)

Source§

async fn run(&self)

Implementors§