parse_line

Function parse_line 

Source
pub fn parse_line<T: GetCardInfo + Clone>(
    string: &str,
) -> Result<CardEntry<T>, ParseError>
Expand description

Parses a line of text

ยงErrors

  • Whenever the supplied GetCardInfo implementation of parse fails.
  • Whenever a non-arabic digit character that is neither a space, a tab or an x is found during the parsing of the number.
  • If the characters found as the amount of copies of the card cannot be parsed into an i64.
  • If the characters found as the amount of copies of the card are parsed into the number 0.
  • If the characters found as the name of the card is empty after being trimmed of spaces.