Skip to main content

get_exercise_from_pairs

Function get_exercise_from_pairs 

Source
pub fn get_exercise_from_pairs(
    pair: Pair<'_, Rule>,
) -> Result<Vec<Exercise>, Error>
Expand description

Parses an exercise from a Pair and returns a vector of Exercises.

§Arguments

  • pair - A Pair that represents an exercise.

§Returns

A Result containing a vector of Exercises if parsing was successful, or an Error if parsing failed.