pub struct NodeContext<'a, FChildParser>{
pub methods: &'a mut TokenStream,
pub fn_name: &'a str,
pub child_parser: FChildParser,
}
Expand description
Context passed around during token generation. FChildParser is a type parameter for the function that parses child elements.
Fields§
§methods: &'a mut TokenStream
§fn_name: &'a str
§child_parser: FChildParser
Implementations§
Source§impl<'a, FChildParser> NodeContext<'a, FChildParser>
impl<'a, FChildParser> NodeContext<'a, FChildParser>
Sourcepub fn parse_children(
&mut self,
children: &[Element],
ignore: &mut Vec<String>,
) -> TokenStream
pub fn parse_children( &mut self, children: &[Element], ignore: &mut Vec<String>, ) -> TokenStream
Helper method to parse child elements using the provided child_parser function.
The ignore
vector is passed directly here for flexibility with constructs like
Auto Trait Implementations§
impl<'a, FChildParser> Freeze for NodeContext<'a, FChildParser>where
FChildParser: Freeze,
impl<'a, FChildParser> RefUnwindSafe for NodeContext<'a, FChildParser>where
FChildParser: RefUnwindSafe,
impl<'a, FChildParser> !Send for NodeContext<'a, FChildParser>
impl<'a, FChildParser> !Sync for NodeContext<'a, FChildParser>
impl<'a, FChildParser> Unpin for NodeContext<'a, FChildParser>where
FChildParser: Unpin,
impl<'a, FChildParser> !UnwindSafe for NodeContext<'a, FChildParser>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more