Skip to main content

CommentHandler

Trait CommentHandler 

Source
pub trait CommentHandler<'a> {
    // Required method
    fn handle_comment(&mut self, comment: Item<&'a str>);
}
Expand description

A comment handler will allow you to specify behavior about what to do with comments officially comments are supposed to operate the same as whitespace so the default behavior would be to throw away any comments found

Required Methods§

Source

fn handle_comment(&mut self, comment: Item<&'a str>)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a> CommentHandler<'a> for DefaultCommentHandler

Source§

impl<'a, F> CommentHandler<'a> for F
where F: FnMut(Item<&'a str>),