pub struct MacroRef {
pub name: String,
pub pattern: Option<String>,
pub params: Vec<String>,
pub pack: String,
pub def_span: Option<Span>,
pub match_span: Option<Span>,
}Expand description
A macro definition — powers completion and is the go-to-definition target.
Fields§
§name: StringMacro name (globally unique across the loaded packs).
pattern: Option<String>The match: pattern (None for use:-only macros).
params: Vec<String>Declared params, in declaration order.
pack: StringSource name of the pack the macro is defined in.
def_span: Option<Span>Byte span of the macro’s name key in the normalized pack source, when locatable. This is the definition anchor go-to-definition jumps to.
match_span: Option<Span>Byte span of the macro’s match: line, when locatable — the preferred
go-to-definition landing anchor (falls back to def_span).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MacroRef
impl RefUnwindSafe for MacroRef
impl Send for MacroRef
impl Sync for MacroRef
impl Unpin for MacroRef
impl UnsafeUnpin for MacroRef
impl UnwindSafe for MacroRef
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