pub fn from_file(snd_card: &str, channel: usize) -> Result<Datastore> {
        let path = Self::path(snd_card, channel);
        let reader =
            BufReader::new(File::open(&path).map_err(|e| Error::FileIOFailed(path.to_owned(), e))?);
        let datastore: Datastore =
            serde_yaml::from_reader(reader).map_err(|e| Error::SerdeError(path.to_owned(), e))?;
        Ok(datastore)
    }
/// Creates a `Datastore` and initializes its fields from the datastore file.
Creates a `Datastore` and initializes its fields from the datastore file.
Creates a ` Datastore ` and initializes its fields from the datastore file .
pub fn from_file(snd_card: &str, channel: usize) -> Result<Datastore> {
        let path = Self::path(snd_card, channel);
        let reader =
            BufReader::new(File::open(&path).map_err(|e| Error::FileIOFailed(path.to_owned(), e))?);
        let datastore: Datastore =
            serde_yaml::from_reader(reader).map_err(|e| Error::SerdeError(path.to_owned(), e))?;
        Ok(datastore)
    }
pub fn from_file ( snd_card : & str , channel : usize ) -> Result < Datastore > { let path = Self :: path ( snd_card , channel ) ; let reader = BufReader :: new ( File :: open ( & path ) . map_err ( | e | Error :: FileIOFailed ( path . to_owned ( ) , e ) ) ? ) ; let datastore : Datastore = serde_yaml :: from_reader ( reader ) . map_err ( | e | Error :: SerdeError ( path . to_owned ( ) , e ) ) ? ; Ok ( datastore ) }
Creates a `Datastore` and initializes its fields from the datastore file.
Creates a ` Datastore ` and initializes its fields from the datastore file .
snd_card
&str
channel
usize
snd_card
&str
channel
usize