[−][src]Struct ra_ap_hir::MacroDef
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]
fn from(ty: MacroDef) -> MacroDefId
[src]
impl From<MacroDef> for ItemInNs
[src]
impl From<MacroDefId> for MacroDef
[src]
fn from(id: MacroDefId) -> MacroDef
[src]
impl HasAttrs for MacroDef
[src]
fn attrs(self, db: &dyn HirDatabase) -> Attrs
[src]
fn docs(self, db: &dyn HirDatabase) -> Option<Documentation>
[src]
fn resolve_doc_path(
self,
db: &dyn HirDatabase,
link: &str,
ns: Option<Namespace>
) -> Option<ModuleDef>
[src]
self,
db: &dyn HirDatabase,
link: &str,
ns: Option<Namespace>
) -> Option<ModuleDef>
impl HasSource for MacroDef
[src]
impl Hash for MacroDef
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<MacroDef> for MacroDef
[src]
impl StructuralEq for MacroDef
[src]
impl StructuralPartialEq for MacroDef
[src]
Auto Trait Implementations
impl RefUnwindSafe for MacroDef
impl Send for MacroDef
impl Sync for MacroDef
impl Unpin for MacroDef
impl UnwindSafe for MacroDef
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Cast for T
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Self: CastTo<U>,
U: HasInterner,
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,