[−][src]Struct ra_ap_hir_def::item_tree::ItemTree
The item tree of a source file.
Implementations
impl ItemTree
[src]
pub fn item_tree_query(
db: &dyn DefDatabase,
file_id: HirFileId
) -> Arc<ItemTree>
[src]
db: &dyn DefDatabase,
file_id: HirFileId
) -> Arc<ItemTree>
pub fn top_level_items(&self) -> &[ModItem]
[src]
Returns an iterator over all items located at the top level of the HirFileId
this
ItemTree
was created from.
pub fn top_level_attrs(&self) -> &Attrs
[src]
Returns the inner attributes of the source file.
pub fn attrs(&self, of: AttrOwner) -> &Attrs
[src]
pub fn inner_items(&self, ast: FileAstId<Item>) -> &[ModItem]
[src]
Returns the lowered inner items that ast
corresponds to.
Most AST items are lowered to a single ModItem
, but some (eg. use
items) may be lowered
to multiple items in the ItemTree
.
pub fn all_inner_items(&self) -> impl Iterator<Item = ModItem> + '_
[src]
pub fn source<S: ItemTreeNode>(
&self,
db: &dyn DefDatabase,
of: ItemTreeId<S>
) -> S::Source
[src]
&self,
db: &dyn DefDatabase,
of: ItemTreeId<S>
) -> S::Source
Trait Implementations
impl Debug for ItemTree
[src]
impl Eq for ItemTree
[src]
impl<N: ItemTreeNode> Index<FileItemTreeId<N>> for ItemTree
[src]
impl Index<GenericParamsId> for ItemTree
[src]
type Output = GenericParams
The returned type after indexing.
fn index(&self, index: GenericParamsId) -> &Self::Output
[src]
impl Index<Idx<Const>> for ItemTree
[src]
type Output = Const
The returned type after indexing.
fn index(&self, index: Idx<Const>) -> &Self::Output
[src]
impl Index<Idx<Enum>> for ItemTree
[src]
type Output = Enum
The returned type after indexing.
fn index(&self, index: Idx<Enum>) -> &Self::Output
[src]
impl Index<Idx<Expr>> for ItemTree
[src]
type Output = Expr
The returned type after indexing.
fn index(&self, index: Idx<Expr>) -> &Self::Output
[src]
impl Index<Idx<ExternCrate>> for ItemTree
[src]
type Output = ExternCrate
The returned type after indexing.
fn index(&self, index: Idx<ExternCrate>) -> &Self::Output
[src]
impl Index<Idx<Field>> for ItemTree
[src]
type Output = Field
The returned type after indexing.
fn index(&self, index: Idx<Field>) -> &Self::Output
[src]
impl Index<Idx<Function>> for ItemTree
[src]
type Output = Function
The returned type after indexing.
fn index(&self, index: Idx<Function>) -> &Self::Output
[src]
impl Index<Idx<Impl>> for ItemTree
[src]
type Output = Impl
The returned type after indexing.
fn index(&self, index: Idx<Impl>) -> &Self::Output
[src]
impl Index<Idx<Import>> for ItemTree
[src]
type Output = Import
The returned type after indexing.
fn index(&self, index: Idx<Import>) -> &Self::Output
[src]
impl Index<Idx<MacroCall>> for ItemTree
[src]
type Output = MacroCall
The returned type after indexing.
fn index(&self, index: Idx<MacroCall>) -> &Self::Output
[src]
impl Index<Idx<Mod>> for ItemTree
[src]
type Output = Mod
The returned type after indexing.
fn index(&self, index: Idx<Mod>) -> &Self::Output
[src]
impl Index<Idx<Static>> for ItemTree
[src]
type Output = Static
The returned type after indexing.
fn index(&self, index: Idx<Static>) -> &Self::Output
[src]
impl Index<Idx<Struct>> for ItemTree
[src]
type Output = Struct
The returned type after indexing.
fn index(&self, index: Idx<Struct>) -> &Self::Output
[src]
impl Index<Idx<Trait>> for ItemTree
[src]
type Output = Trait
The returned type after indexing.
fn index(&self, index: Idx<Trait>) -> &Self::Output
[src]
impl Index<Idx<TypeAlias>> for ItemTree
[src]
type Output = TypeAlias
The returned type after indexing.
fn index(&self, index: Idx<TypeAlias>) -> &Self::Output
[src]
impl Index<Idx<Union>> for ItemTree
[src]
type Output = Union
The returned type after indexing.
fn index(&self, index: Idx<Union>) -> &Self::Output
[src]
impl Index<Idx<Variant>> for ItemTree
[src]
type Output = Variant
The returned type after indexing.
fn index(&self, index: Idx<Variant>) -> &Self::Output
[src]
impl Index<RawVisibilityId> for ItemTree
[src]
type Output = RawVisibility
The returned type after indexing.
fn index(&self, index: RawVisibilityId) -> &Self::Output
[src]
impl PartialEq<ItemTree> for ItemTree
[src]
impl StructuralEq for ItemTree
[src]
impl StructuralPartialEq for ItemTree
[src]
Auto Trait Implementations
impl RefUnwindSafe for ItemTree
impl Send for ItemTree
impl Sync for ItemTree
impl Unpin for ItemTree
impl UnwindSafe for ItemTree
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
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<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, 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>,