pub trait AsyncModelPersistence {
type Error: Error + Send + Sync;
// Required methods
fn save_async<'a>(
&'a self,
path: &'a Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
fn load_async<'a>(
path: &'a Path,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'a>>
where Self: Sized;
fn save_compressed_async<'a>(
&'a self,
path: &'a Path,
compression_level: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
}Expand description
Async model persistence
Required Associated Types§
Required Methods§
Sourcefn save_async<'a>(
&'a self,
path: &'a Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn save_async<'a>( &'a self, path: &'a Path, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
Save model asynchronously