pub struct Expander { /* private fields */ }
Implementations§
source§impl Expander
impl Expander
pub fn new( db: &dyn DefDatabase, current_file_id: HirFileId, module: ModuleId, ) -> Expander
pub fn krate(&self) -> CrateId
pub fn syntax_context(&self) -> SyntaxContextId
pub fn enter_expand<T: AstNode>( &mut self, db: &dyn DefDatabase, macro_call: MacroCall, resolver: impl Fn(&ModPath) -> Option<MacroId>, ) -> Result<ExpandResult<Option<(Mark, Parse<T>)>>, UnresolvedMacro>
pub fn enter_expand_id<T: AstNode>( &mut self, db: &dyn DefDatabase, call_id: MacroCallId, ) -> ExpandResult<Option<(Mark, Parse<T>)>>
pub fn exit(&mut self, mark: Mark)
pub fn ctx<'a>( &self, db: &'a dyn DefDatabase, types_map: &'a mut TypesMap, types_source_map: &'a mut TypesSourceMap, ) -> LowerCtx<'a>
pub fn current_file_id(&self) -> HirFileId
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Expander
impl !RefUnwindSafe for Expander
impl Send for Expander
impl !Sync for Expander
impl Unpin for Expander
impl UnwindSafe for Expander
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more