reloadable_core/
lib.rs

1//! A abstract reloadable state core traits.
2
3/// Something that can perform a single load operation.
4pub trait Loader {
5    /// The value to load.
6    type Value;
7    /// The error we can encounter while loading.
8    type Error;
9
10    /// Load the value.
11    fn load(
12        &mut self,
13    ) -> impl std::future::Future<Output = Result<Self::Value, Self::Error>> + Send;
14}