pub struct TriviaComment {
pub text: String,
pub span: Span,
pub attachment: Attachment,
pub file: Option<String>,
}Expand description
A source comment retained for lossless round-tripping.
Fields§
§text: String§span: Span§attachment: Attachment§file: Option<String>Source file (includes parse as their own documents, C-025): line numbers repeat across files, so attachment scans match (line, file) — without this, comments in an included file attach to same-numbered lines of the including document.
Trait Implementations§
Source§impl Clone for TriviaComment
impl Clone for TriviaComment
Auto Trait Implementations§
impl Freeze for TriviaComment
impl RefUnwindSafe for TriviaComment
impl Send for TriviaComment
impl Sync for TriviaComment
impl Unpin for TriviaComment
impl UnsafeUnpin for TriviaComment
impl UnwindSafe for TriviaComment
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