Trait hir_def::AsMacroCall
source · pub trait AsMacroCall {
// Required method
fn as_call_id_with_errors(
&self,
db: &dyn ExpandDatabase,
krate: CrateId,
resolver: impl Fn(&ModPath) -> Option<MacroDefId> + Copy,
) -> Result<ExpandResult<Option<MacroCallId>>, UnresolvedMacro>;
// Provided method
fn as_call_id(
&self,
db: &dyn ExpandDatabase,
krate: CrateId,
resolver: impl Fn(&ModPath) -> Option<MacroDefId> + Copy,
) -> Option<MacroCallId> { ... }
}
Expand description
A helper trait for converting to MacroCallId
Required Methods§
fn as_call_id_with_errors( &self, db: &dyn ExpandDatabase, krate: CrateId, resolver: impl Fn(&ModPath) -> Option<MacroDefId> + Copy, ) -> Result<ExpandResult<Option<MacroCallId>>, UnresolvedMacro>
Provided Methods§
fn as_call_id( &self, db: &dyn ExpandDatabase, krate: CrateId, resolver: impl Fn(&ModPath) -> Option<MacroDefId> + Copy, ) -> Option<MacroCallId>
Object Safety§
This trait is not object safe.