pub struct Meta {
pub span: Span,
pub expansion: Vec<(Arc<str>, Span)>,
pub doc: Option<Arc<str>>,
}Expand description
Everything a Node knows about itself beyond its shape.
Fields§
§span: Span§expansion: Vec<(Arc<str>, Span)>The macro expansion chain this node came out of, innermost last. Empty for source code.
doc: Option<Arc<str>>The ## doc comment written immediately above this node, lines joined by \n with the
marker and one leading space stripped (crate::doc).
Metadata rather than a form, for the same reason a span is: a doc comment is not part of a
node’s identity (Node::structurally_eq), so every pass that matches on def or model
keeps working and a doc-only edit is not a change of meaning.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Meta
impl RefUnwindSafe for Meta
impl Send for Meta
impl Sync for Meta
impl Unpin for Meta
impl UnwindSafe for Meta
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