fn from_str(word: &str) -> Result<RowType, Self::Err> {
        match &word[0..1] {
            "N" => Ok(RowType::Cost),
            "L" => Ok(RowType::Constraint(ConstraintRelation::Less)),
            "E" => Ok(RowType::Constraint(ConstraintRelation::Equal)),
            "G" => Ok(RowType::Constraint(ConstraintRelation::Greater)),
            _ => Err(ParseError::new(format!("Row type \"{}\" unknown.", word))),
        }
    }
/// Try to read a `RowType` from a string slice.
///
/// The type of a row is denoted by `N` if it's the cost row; this row is often unique. There is
/// no defined behaviour for multiple cost rows. Constraint rows are indicated by `L`, `E` or
/// `G`.
///
/// # Arguments
///
/// * `word`: The input `String` slice.
///
/// # Return value
///
/// A `RowType` variant if the `String` slice matches either `N`, `L`, `E` or `G`.
///
/// # Errors
///
/// Any `String` slices not equal to either `N`, `L`, `E` or `G` will fair to be parsed.
Try to read a `RowType` from a string slice.
The type of a row is denoted by `N` if it's the cost row; this row is often unique. There is
no defined behaviour for multiple cost rows.
Try to read a ` RowType ` from a string slice . The type of a row is denoted by ` N ` if it ' s the cost row ; this row is often unique . There is no defined behaviour for multiple cost rows .
fn from_str(word: &str) -> Result<RowType, Self::Err> {
        match &word[0..1] {
            "N" => Ok(RowType::Cost),
            "L" => Ok(RowType::Constraint(ConstraintRelation::Less)),
            "E" => Ok(RowType::Constraint(ConstraintRelation::Equal)),
            "G" => Ok(RowType::Constraint(ConstraintRelation::Greater)),
            _ => Err(ParseError::new(format!("Row type \"{}\" unknown.", word))),
        }
    }
fn from_str ( word : & str ) -> Result < RowType , Self :: Err > { match & word [ 0 .. 1 ] { " " => Ok ( RowType :: Cost ) , " " => Ok ( RowType :: Constraint ( ConstraintRelation :: Less ) ) , " " => Ok ( RowType :: Constraint ( ConstraintRelation :: Equal ) ) , " " => Ok ( RowType :: Constraint ( ConstraintRelation :: Greater ) ) , _ => Err ( ParseError :: new ( format ! ( " \" \" " word ) ) ) , } }
Try to read a `RowType` from a string slice.
Try to read a ` RowType ` from a string slice .
word
&str
word
&str
return value
A `RowType` variant if the `String` slice matches either `N`, `L`, `E` or `G`.
A ` RowType ` variant if the ` String ` slice matches either ` N ` ` L ` ` E ` or ` G ` .
errors
Any `String` slices not equal to either `N`, `L`, `E` or `G` will fair to be parsed.
Any ` String ` slices not equal to either ` N ` ` L ` ` E ` or ` G ` will fair to be parsed .