pub fn parse_name(name: &str, value: Value) -> Result<Self, String> {
		for candidate in OPTIONS {
			if name.eq_ignore_ascii_case(candidate.name) {
				if candidate.kind != value.kind() {
					return Err(format!("wrong value type for option {}: expected {} but got {}", candidate.name, candidate.kind, value.kind()))
				}
				return Ok(Self{name: candidate.name, option: candidate.option, value: value})
			}
		}

		Err(format!("unknown option: {}", name))
	}
/// Parse an option from the name and value.
///
/// The name will be lookup up in the global OPTIONS list to retrieve the required metadata.
Parse an option from the name and value.
The name will be lookup up in the global OPTIONS list to retrieve the required metadata.
Parse an option from the name and value . The name will be lookup up in the global OPTIONS list to retrieve the required metadata .
pub fn parse_name(name: &str, value: Value) -> Result<Self, String> {
		for candidate in OPTIONS {
			if name.eq_ignore_ascii_case(candidate.name) {
				if candidate.kind != value.kind() {
					return Err(format!("wrong value type for option {}: expected {} but got {}", candidate.name, candidate.kind, value.kind()))
				}
				return Ok(Self{name: candidate.name, option: candidate.option, value: value})
			}
		}
		Err(format!("unknown option: {}", name))
	}
pub fn parse_name ( name : & str , value : Value ) -> Result < Self , String > { for candidate in OPTIONS { if name . eq_ignore_ascii_case ( candidate . name ) { if candidate . kind != value . kind ( ) { return Err ( format ! ( " " candidate name candidate kind value kind ( ) ) ) } return Ok ( Self { name : candidate . name , option : candidate . option , value : value } ) } } Err ( format ! ( " " name ) ) }
Parse an option from the name and value.
Parse an option from the name and value .
name
&str
value
Value
name
&str
value
Value