/// Parse an `impl` item with the given attributes.
Parse an `impl` item with the given attributes.
Parse an ` impl ` item with the given attributes .
pub fn parse_with_attributes(
        parser: &mut Parser<'_>,
        attributes: Vec<ast::Attribute>,
    ) -> Result<Self, ParseError> {
        let impl_ = parser.parse()?;
        let path = parser.parse()?;
        let open = parser.parse()?;
        let mut functions = vec![];
        while !parser.peek::<ast::CloseBrace>()? {
            functions.push(ast::ItemFn::parse(parser)?);
        }
        let close = parser.parse()?;
        Ok(Self {
            attributes,
            impl_,
            path,
            open,
            functions,
            close,
        })
    }
pub fn parse_with_attributes ( parser : & mut Parser < ' _ > , attributes : Vec < ast :: Attribute > , ) -> Result < Self , ParseError > { let impl_ = parser . parse ( ) ? ; let path = parser . parse ( ) ? ; let open = parser . parse ( ) ? ; let mut functions = vec ! [ ] ; while ! parser . peek :: < ast :: CloseBrace > ( ) ? { functions . push ( ast :: ItemFn :: parse ( parser ) ? ) ; } let close = parser . parse ( ) ? ; Ok ( Self { attributes , impl_ , path , open , functions , close , } ) }
Parse an `impl` item with the given attributes.
Parse an ` impl ` item with the given attributes .
parser
&mut Parser<'_>
attributes
Vec<ast::Attribute>