Text is the contents of the comment, while raw includes additional characters based on the type of comment, such as the comment delimiters or "start and end symbols" of the comment.
rawincludes the whole line.
rawincludes only the block comment delimiters.
The above is only true, for events parsed by
let line = Event::LineComment(" // Foo Bar", " Foo Bar"); assert_eq!(line.text(), " Foo Bar"); assert_eq!(line.raw(), " // Foo Bar"); let block = Event::BlockComment("/* Foo\n Bar */", " Foo\n Bar "); assert_eq!(block.text(), " Foo\n Bar "); assert_eq!(block.raw(), "/* Foo\n Bar */");
Returns the raw part of an
Returns the text part of an
impl<'a> StructuralPartialEq for Event<'a>[src]
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> UnwindSafe for Event<'a>
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.