pub fn parse_config(path: String) -> Result<Vec<Backup>, String> {
	match File::open(path) {
		Ok(f) => match serde_json::from_reader(BufReader::new(f)) {
			Ok(v) => return Ok(v),
			Err(e) => return Err(format!("Error parsing the file: {}", e)),
		},
		Err(e) => return Err(format!("Error opening the file: {}", e)),
	}
}
/// Try to parse the specified file to a backuper configuration
///
/// # Arguments
///
/// * `path` - The path to for deserialization
Try to parse the specified file to a backuper configuration
Try to parse the specified file to a backuper configuration
pub fn parse_config(path: String) -> Result<Vec<Backup>, String> {
	match File::open(path) {
		Ok(f) => match serde_json::from_reader(BufReader::new(f)) {
			Ok(v) => return Ok(v),
			Err(e) => return Err(format!("Error parsing the file: {}", e)),
		},
		Err(e) => return Err(format!("Error opening the file: {}", e)),
	}
}
pub fn parse_config ( path : String ) -> Result < Vec < Backup > , String > { match File :: open ( path ) { Ok ( f ) => match serde_json :: from_reader ( BufReader :: new ( f ) ) { Ok ( v ) => return Ok ( v ) , Err ( e ) => return Err ( format ! ( " " e ) ) , } , Err ( e ) => return Err ( format ! ( " " e ) ) , } }
Try to parse the specified file to a backuper configuration
Try to parse the specified file to a backuper configuration
path
String
path
String