#[non_exhaustive]pub struct Comment { /* private fields */ }Expand description
One signed comment on a talk page.
Implementations§
Source§impl Comment
impl Comment
The signer, when a user link precedes the timestamp on the same line.
Sourcepub fn time(&self) -> Option<CommentTime>
pub fn time(&self) -> Option<CommentTime>
The signature timestamp.
Sourcepub fn level(&self) -> u8
pub fn level(&self) -> u8
Indentation depth: the count of leading :/*/# markers on the comment’s first
line (0 for a top-level comment).
Sourcepub fn span(&self) -> Span
pub fn span(&self) -> Span
Source span of the comment: its first line through the end of its signature.
Sourcepub fn signature_span(&self) -> Span
pub fn signature_span(&self) -> Span
Source span of the signature itself (the author link, when present, through the timestamp).
Sourcepub fn parent(&self) -> Option<usize>
pub fn parent(&self) -> Option<usize>
Index, in Discussion::comments, of the nearest less-indented comment this one
replies to; None for a top-level comment.
Trait Implementations§
impl Eq for Comment
impl StructuralPartialEq for Comment
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