fn load<P: AsRef<path::Path>>(path: P) -> Result<Self, Error> {
        let path = path.as_ref();
        let file = std::fs::File::open(path)
            .with_context(|| format!("lowpan could not open the config file {}", path.display()))?;
        let config = serde_json::from_reader(io::BufReader::new(file)).with_context(|| {
            format!("lowpan could not deserialize the config file {}", path.display())
        })?;
        Ok(config)
    }
/// Loads config variables with the deserialized contents of config file
Loads config variables with the deserialized contents of config file
Loads config variables with the deserialized contents of config file
fn load<P: AsRef<path::Path>>(path: P) -> Result<Self, Error> {
        let path = path.as_ref();
        let file = std::fs::File::open(path)
            .with_context(|| format!("lowpan could not open the config file {}", path.display()))?;
        let config = serde_json::from_reader(io::BufReader::new(file)).with_context(|| {
            format!("lowpan could not deserialize the config file {}", path.display())
        })?;
        Ok(config)
    }
fn load < P : AsRef < path :: Path > > ( path : P ) -> Result < Self , Error > { let path = path . as_ref ( ) ; let file = std :: fs :: File :: open ( path ) . with_context ( | | format ! ( " " path display ( ) ) ) ? ; let config = serde_json :: from_reader ( io :: BufReader :: new ( file ) ) . with_context ( | | { format ! ( " " path display ( ) ) } ) ? ; Ok ( config ) }
Loads config variables with the deserialized contents of config file
Loads config variables with the deserialized contents of config file
path
P
path
P