fn parse<B: BufRead>(
        &mut self,
        line_parser: &RefCell<PropertyParser<B>>,
    ) -> Result<(), ParserError> {
        loop {
            let line: Property;

            {
                line = match line_parser.borrow_mut().next() {
                    Some(val) => val.map_err(|e| ParserError::PropertyError(e))?,
                    None => return Err(ParserError::NotComplete.into()),
                };
            }

            match line.name.to_uppercase().as_str() {
                "END" => break,
                "BEGIN" => match line.value {
                    Some(v) => self.add_sub_component(v.as_str(), line_parser)?,
                    None => return Err(ParserError::NotComplete.into()),
                },

                _ => self.add_property(line),
            };
        }

        Ok(())
    }
/// Parse the content from `line_parser` and fill the component with.
Parse the content from `line_parser` and fill the component with.
Parse the content from ` line_parser ` and fill the component with .
fn parse<B: BufRead>(
        &mut self,
        line_parser: &RefCell<PropertyParser<B>>,
    ) -> Result<(), ParserError> {
        loop {
            let line: Property;
            {
                line = match line_parser.borrow_mut().next() {
                    Some(val) => val.map_err(|e| ParserError::PropertyError(e))?,
                    None => return Err(ParserError::NotComplete.into()),
                };
            }
            match line.name.to_uppercase().as_str() {
                "END" => break,
                "BEGIN" => match line.value {
                    Some(v) => self.add_sub_component(v.as_str(), line_parser)?,
                    None => return Err(ParserError::NotComplete.into()),
                },
                _ => self.add_property(line),
            };
        }
        Ok(())
    }
fn parse < B : BufRead > ( & mut self , line_parser : & RefCell < PropertyParser < B > > , ) -> Result < ( ) , ParserError > { loop { let line : Property ; { line = match line_parser . borrow_mut ( ) . next ( ) { Some ( val ) => val . map_err ( | e | ParserError :: PropertyError ( e ) ) ? , None => return Err ( ParserError :: NotComplete . into ( ) ) , } ; } match line . name . to_uppercase ( ) . as_str ( ) { " " => break , " " => match line . value { Some ( v ) => self . add_sub_component ( v . as_str ( ) , line_parser ) ? , None => return Err ( ParserError :: NotComplete . into ( ) ) , } , _ => self . add_property ( line ) , } ; } Ok ( ( ) ) }
Parse the content from `line_parser` and fill the component with.
Parse the content from ` line_parser ` and fill the component with .
&mut self
line_parser
&RefCell<PropertyParser<B>>
&mut self
line_parser
&RefCell<PropertyParser<B>>