pub struct SourceFacet {
pub origin: SourceOrigin,
pub span: Option<ByteSpan>,
pub macro_chain: Vec<MacroExpansion>,
pub doc_comments: Vec<String>,
}Expand description
Provenance, always present on every node.
A node created programmatically records a synthetic origin rather than none, so “where did this come from” always has an answer. Spec §4.7.
Fields§
§origin: SourceOriginWhere the node came from.
span: Option<ByteSpan>Byte range in the source file, when there is one.
macro_chain: Vec<MacroExpansion>Preprocessor expansions that produced this construct, outermost first.
doc_comments: Vec<String>Documentation comments attached to the declaration.
Implementations§
Trait Implementations§
Source§impl Clone for SourceFacet
impl Clone for SourceFacet
Source§impl Debug for SourceFacet
impl Debug for SourceFacet
Source§impl Default for SourceFacet
impl Default for SourceFacet
impl Eq for SourceFacet
Source§impl PartialEq for SourceFacet
impl PartialEq for SourceFacet
impl StructuralPartialEq for SourceFacet
Auto Trait Implementations§
impl Freeze for SourceFacet
impl RefUnwindSafe for SourceFacet
impl Send for SourceFacet
impl Sync for SourceFacet
impl Unpin for SourceFacet
impl UnsafeUnpin for SourceFacet
impl UnwindSafe for SourceFacet
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