/// Default implementation for loading the file and parsing it into the
/// struct that is defined by [Save::Typ].
///
Default implementation for loading the file and parsing it into the
struct that is defined by [Save::Typ].
Default implementation for loading the file and parsing it into the struct that is defined by [ Save :: Typ ] .
async fn load(&self) {
        let file = OpenOptions::new()
            .read(true)
            .open(self.file())
            .await;
        if let Ok(file) = file {
            let mut buf = BufStream::new(file);
            let data = Self::Typ::read(&mut buf).await.unwrap_or_default();
            self.write(data).await;
        }
    }
async fn load ( & self ) { let file = OpenOptions :: new ( ) . read ( true ) . open ( self . file ( ) ) . await ; if let Ok ( file ) = file { let mut buf = BufStream :: new ( file ) ; let data = Self :: Typ :: read ( & mut buf ) . await . unwrap_or_default ( ) ; self . write ( data ) . await ; } }
Default implementation for loading the file and parsing it into the
struct that is defined by [Save::Typ].
Default implementation for loading the file and parsing it into the struct that is defined by [ Save :: Typ ] .
&self