pub struct Comment<'a> { /* private fields */ }Expand description
A validated comment: the text without the outer parentheses, and the deepest nesting reached.
§Examples
use parse_net::{text::parse_comment, Limits};
let (c, _) = parse_comment(b"(a(b))", &Limits::DEFAULT)?;
assert_eq!((c.raw(), c.max_depth()), (&b"a(b)"[..], 2));Implementations§
Trait Implementations§
impl<'a> Copy for Comment<'a>
impl<'a> Eq for Comment<'a>
impl<'a> StructuralPartialEq for Comment<'a>
Auto Trait Implementations§
impl<'a> Freeze for Comment<'a>
impl<'a> RefUnwindSafe for Comment<'a>
impl<'a> Send for Comment<'a>
impl<'a> Sync for Comment<'a>
impl<'a> Unpin for Comment<'a>
impl<'a> UnsafeUnpin for Comment<'a>
impl<'a> UnwindSafe for Comment<'a>
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