pub struct Comment {
pub text: String,
pub location: SourceLocation,
pub kind: CommentKind,
pub position: CommentPosition,
}Fields§
§text: StringThe comment text (without // or /* */ delimiters)
location: SourceLocationLocation in source
kind: CommentKindLine or block comment
position: CommentPositionPosition relative to associated node
Implementations§
Source§impl Comment
impl Comment
pub fn new( text: String, location: SourceLocation, kind: CommentKind, position: CommentPosition, ) -> Self
Sourcepub fn contains(&self, pattern: &str) -> bool
pub fn contains(&self, pattern: &str) -> bool
Check if comment contains a specific annotation (case-insensitive)
Sourcepub fn extract_ignore_rules(&self) -> Option<Vec<String>>
pub fn extract_ignore_rules(&self) -> Option<Vec<String>>
Extract gobject-linter-ignore rule names from comment Returns Some(vec![rule_names]) if this is an ignore directive
Sourcepub fn is_gtk_doc(&self) -> bool
pub fn is_gtk_doc(&self) -> bool
Check if this is a GTK-Doc style documentation comment
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnsafeUnpin for Comment
impl UnwindSafe for Comment
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