Trait FileSave

Source
pub trait FileSave<'en>:
    Sized
    + Send
    + Sync
    + 'static {
    // Required method
    fn save<'life0, 'async_trait>(
        &'en self,
        file: &'life0 mut File,
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
       where 'en: 'async_trait,
             'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Write a file-backed data structure to the filesystem.

Required Methods§

Source

fn save<'life0, 'async_trait>( &'en self, file: &'life0 mut File, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'en: 'async_trait, 'life0: 'async_trait, Self: 'async_trait,

Save this state to the given file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'en, T> FileSave<'en> for T
where T: ToStream<'en> + Send + Sync + 'static,