/// Default implementation for writing the current struct to a file
///
Default implementation for writing the current struct to a file
Default implementation for writing the current struct to a file
async fn save(&self) {
        let file = OpenOptions::new()
            .create(true)
            .read(true)
            .write(true)
            .open(self.file())
            .await;
        if let Ok(file) = file {
            let cache = self.read().await;
            let mut buf = BufStream::new(file);
            let _ = cache.write(&mut buf).await;
            let _ = buf.flush().await;
        }
    }
async fn save ( & self ) { let file = OpenOptions :: new ( ) . create ( true ) . read ( true ) . write ( true ) . open ( self . file ( ) ) . await ; if let Ok ( file ) = file { let cache = self . read ( ) . await ; let mut buf = BufStream :: new ( file ) ; let _ = cache . write ( & mut buf ) . await ; let _ = buf . flush ( ) . await ; } }
Default implementation for writing the current struct to a file
Default implementation for writing the current struct to a file
&self