reloadable-core 0.1.0

A generic reloadable state management core traits.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! A abstract reloadable state core traits.

/// Something that can perform a single load operation.
pub trait Loader {
    /// The value to load.
    type Value;
    /// The error we can encounter while loading.
    type Error;

    /// Load the value.
    fn load(
        &mut self,
    ) -> impl std::future::Future<Output = Result<Self::Value, Self::Error>> + Send;
}