/// Attempts to load the settings from the given config_file_path.
///
/// Returns the default value if unable to read or parse the file. The returned option will
/// only be None if the default_value was provided as None.
Attempts to load the settings from the given config_file_path.
Returns the default value if unable to read or parse the file. The returned option will
only be None if the default_value was provided as None.
Attempts to load the settings from the given config_file_path . Returns the default value if unable to read or parse the file . The returned option will only be None if the default_value was provided as None .
fn load_default_settings(&self) -> Option<T> {
        File::open(self.config_file_path.as_ref())
            .map_err(|_e| {
                // TODO(fxbug.dev/67569): Report config load status.
            })
            .ok()
            .and_then(|file| {
                serde_json::from_reader(BufReader::new(file))
                    .map_err(|_e| {
                        // TODO(fxbug.dev/67569): Report config load status.
                    })
                    .ok()
            })
            .unwrap_or_else(|| self.default_value.clone())
    }
fn load_default_settings ( & self ) -> Option < T > { File :: open ( self . config_file_path . as_ref ( ) ) . map_err ( | _e | { // TODO(fxbug.dev/67569): Report config load status. } ) . ok ( ) . and_then ( | file | { serde_json :: from_reader ( BufReader :: new ( file ) ) . map_err ( | _e | { // TODO(fxbug.dev/67569): Report config load status. } ) . ok ( ) } ) . unwrap_or_else ( | | self . default_value . clone ( ) ) }
Attempts to load the settings from the given config_file_path.
Attempts to load the settings from the given config_file_path .
&self