[][src]Struct ra_ap_hir::MacroDef

pub struct MacroDef { /* fields omitted */ }

Implementations

impl MacroDef[src]

pub fn module(self, db: &dyn HirDatabase) -> Option<Module>[src]

FIXME: right now, this just returns the root module of the crate that defines this macro. The reasons for this is that macros are expanded early, in hir_expand, where modules simply do not exist yet.

pub fn name(self, db: &dyn HirDatabase) -> Option<Name>[src]

XXX: this parses the file

pub fn is_proc_macro(&self) -> bool[src]

Indicate it is a proc-macro

pub fn is_derive_macro(&self) -> bool[src]

Indicate it is a derive macro

Trait Implementations

impl Clone for MacroDef[src]

impl Copy for MacroDef[src]

impl Debug for MacroDef[src]

impl Eq for MacroDef[src]

impl From<MacroDef> for MacroDefId[src]

impl From<MacroDef> for ItemInNs[src]

impl From<MacroDefId> for MacroDef[src]

impl HasAttrs for MacroDef[src]

impl HasSource for MacroDef[src]

type Ast = Macro

impl Hash for MacroDef[src]

impl PartialEq<MacroDef> for MacroDef[src]

impl StructuralEq for MacroDef[src]

impl StructuralPartialEq for MacroDef[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Cast for T

impl<T> CloneAny for T where
    T: Clone + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.