pub struct Macro {
pub name: String,
pub pack: String,
pub params: Vec<String>,
pub defaults: BTreeMap<String, String>,
pub pattern: Option<String>,
pub description: Option<String>,
pub tags: Vec<String>,
pub body: MacroBody,
pub bind: BTreeMap<String, String>,
pub source: Arc<str>,
pub span: Option<Span>,
pub match_span: Option<Span>,
}Expand description
One loaded macro.
Fields§
§name: StringMacro name (globally unique across loaded packs).
pack: StringSource pack name this macro came from.
params: Vec<String>Declared params (required unless defaulted).
defaults: BTreeMap<String, String>Default values for optional params.
pattern: Option<String>The Gherkin-reachable match: pattern (absent = use:-only macro).
description: Option<String>Documentation string.
Macro tags.
body: MacroBodyRequest steps or assert-only body.
bind: BTreeMap<String, String>Macro-scope fragment bindings (ADR-0018), overriding pack scope.
source: Arc<str>The pack source text (for diagnostics).
span: Option<Span>Span of the macro’s name in the pack file, when locatable.
match_span: Option<Span>Span of the macro’s match: line in the pack file, when locatable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Macro
impl RefUnwindSafe for Macro
impl Send for Macro
impl Sync for Macro
impl Unpin for Macro
impl UnsafeUnpin for Macro
impl UnwindSafe for Macro
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