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
Source§fn clone(&self) -> CommentedSource
fn clone(&self) -> CommentedSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CommentedSource
impl RefUnwindSafe for CommentedSource
impl Send for CommentedSource
impl Sync for CommentedSource
impl Unpin for CommentedSource
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