pub struct Comments {
pub before: Vec<Arc<str>>,
pub trailing: Option<Arc<str>>,
pub after: Vec<Arc<str>>,
}Expand description
The ordinary comments attached to one node, in the three positions a comment can hold.
A doc comment is a single run above a declaration and is Meta::doc. These are the rest, and
they are kept because beck fmt prints from the tree: what the tree does not carry, the
formatter deletes.
Fields§
§before: Vec<Arc<str>>Full-line comments immediately above, in source order.
trailing: Option<Arc<str>>A comment at the end of this node’s own line.
after: Vec<Arc<str>>Full-line comments below it with nothing after them in the block — the end of a body, or the end of the file. They attach backwards because there is no node beneath to hold them.
Trait Implementations§
impl Eq for Comments
impl StructuralPartialEq for Comments
Auto Trait Implementations§
impl Freeze for Comments
impl RefUnwindSafe for Comments
impl Send for Comments
impl Sync for Comments
impl Unpin for Comments
impl UnwindSafe for Comments
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