pub struct CommentedSource {
pub source: String,
pub comments: BTreeMap<usize, Vec<Comment>>,
pub file_header_comments: Vec<Comment>,
}Expand description
Represents a source file with comments tracked separately.
Fields§
§source: StringThe original source code
comments: BTreeMap<usize, Vec<Comment>>Map of line numbers to comments
file_header_comments: Vec<Comment>Leading comments to output before the file header
Implementations§
Trait Implementations§
Source§impl Clone for CommentedSource
impl Clone for CommentedSource
Auto Trait Implementations§
impl Forget for CommentedSource
impl Freeze for CommentedSource
impl Move for CommentedSource
impl RefUnwindSafe for CommentedSource
impl Send for CommentedSource
impl Sync for CommentedSource
impl Unpin for CommentedSource
impl UnsafeUnpin for CommentedSourcewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<usize, Vec<Comment>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(usize, Vec<Comment>)>>: UnsafeUnpin,
PhantomData<Comment>: UnsafeUnpin,
impl UnwindSafe for CommentedSource
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