pub fn parse(src: &str) -> Result<Deck, ParsingErrorLine> {
        // Parse.
        let mut parser = Parser::default();
        parser.parse(src)?;
        // Ensure that the deck is nonempty.
        if parser.deck.cards.is_empty() {
            Err(ParsingErrorLine {
                err: ParsingError::Other("empty deck"),
                line_num: 0,
            })
        } else { Ok(parser.deck) }
    }
/// Parse deck from `.mu` format.
///
/// This will give an error if the deck was empty.
Parse deck from `.mu` format.
This will give an error if the deck was empty.
Parse deck from ` . mu ` format . This will give an error if the deck was empty .
pub fn parse(src: &str) -> Result<Deck, ParsingErrorLine> {
        // Parse.
        let mut parser = Parser::default();
        parser.parse(src)?;
        // Ensure that the deck is nonempty.
        if parser.deck.cards.is_empty() {
            Err(ParsingErrorLine {
                err: ParsingError::Other("empty deck"),
                line_num: 0,
            })
        } else { Ok(parser.deck) }
    }
pub fn parse ( src : & str ) -> Result < Deck , ParsingErrorLine > { // Parse. let mut parser = Parser :: default ( ) ; parser . parse ( src ) ? ; // Ensure that the deck is nonempty. if parser . deck . cards . is_empty ( ) { Err ( ParsingErrorLine { err : ParsingError :: Other ( " " ) , line_num : 0 , } ) } else { Ok ( parser . deck ) } }
Parse deck from `.mu` format.
Parse deck from ` . mu ` format .
src
&str
src
&str