struct Module {
name: &'static str,
body_items: Vec<Item>,
use_items: Vec<Item>,
}Fields§
§name: &'static str§body_items: Vec<Item>All items except use items.
use_items: Vec<Item>Use items are kept separately as they help when the selection is inside an impl block, we can directly take these items and keep them outside generated impl block inside generated module.
Implementations§
Source§impl Module
impl Module
fn get_usages_and_record_fields( &self, ctx: &AssistContext<'_, '_>, replace_range: TextRange, ) -> (FxHashMap<FileId, Vec<(TextRange, String)>>, Vec<SyntaxNode>, FxHashMap<TextSize, Use>)
fn expand_and_group_usages_file_wise( &self, ctx: &AssistContext<'_, '_>, replace_range: TextRange, node_def: Definition, refs_in_files: &mut FxHashMap<FileId, Vec<(TextRange, String)>>, use_stmts_to_be_inserted: &mut FxHashMap<TextSize, Use>, )
fn change_visibility(&mut self, record_fields: Vec<SyntaxNode>)
fn resolve_imports( &mut self, module: Option<Module>, ctx: &AssistContext<'_, '_>, ) -> Vec<TextRange>
fn process_def_in_sel( &mut self, def: Definition, use_node: &SyntaxNode, curr_parent_module: &Option<Module>, ctx: &AssistContext<'_, '_>, ) -> Option<TextRange>
fn process_use_stmt_for_import_resolve( &self, use_stmt: Option<Use>, node_syntax: &SyntaxNode, ) -> Option<(Vec<Path>, Option<TextRange>)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Module
impl !RefUnwindSafe for Module
impl !Send for Module
impl !Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl !UnwindSafe for Module
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§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