Enum ra_ap_ide_db::helpers::insert_use::ImportScope [−][src]
pub enum ImportScope {
File(SourceFile),
Module(ItemList),
Block(StmtList),
}
Variants
File(SourceFile)
Tuple Fields of File
0: SourceFile
Module(ItemList)
Tuple Fields of Module
0: ItemList
Block(StmtList)
Tuple Fields of Block
0: StmtList
Implementations
pub fn find_insert_use_container(
position: &SyntaxNode,
sema: &Semantics<'_, RootDatabase>
) -> Option<Self>
pub fn find_insert_use_container(
position: &SyntaxNode,
sema: &Semantics<'_, RootDatabase>
) -> Option<Self>
Determines the containing syntax node in which to insert a use
statement affecting position
.
Returns the original source node inside attributes.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ImportScope
impl !Send for ImportScope
impl !Sync for ImportScope
impl Unpin for ImportScope
impl !UnwindSafe for ImportScope
Blanket Implementations
Mutably borrows from an owned value. Read more
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more