Module trait_impl

Module trait_impl 

Source
Expand description

Completion for associated items in a trait implementation.

This module adds the completion items related to implementing associated items within an impl Trait for Struct block. The current context node must be within either a FN, TYPE_ALIAS, or CONST node and an direct child of an IMPL.

ยงExamples

Considering the following trait impl:

โ“˜
trait SomeTrait {
    fn foo();
}

impl SomeTrait for () {
    fn f$0
}

may result in the completion of the following method:

โ“˜

impl SomeTrait for () {
    fn foo() {}$0
}

Enumsยง

AsyncSugaring ๐Ÿ”’
ImplCompletionKind ๐Ÿ”’

Functionsยง

add_const_impl ๐Ÿ”’
add_function_impl ๐Ÿ”’
add_function_impl_ ๐Ÿ”’
add_type_alias_impl ๐Ÿ”’
complete_trait_impl ๐Ÿ”’
complete_trait_impl_const ๐Ÿ”’
complete_trait_impl_fn ๐Ÿ”’
complete_trait_impl_item_by_name ๐Ÿ”’
complete_trait_impl_name ๐Ÿ”’
complete_trait_impl_type_alias ๐Ÿ”’
function_declaration ๐Ÿ”’
get_transformed_assoc_item ๐Ÿ”’
Transform a relevant associated item to inline generics from the impl, remove attrs and docs, etc.
get_transformed_fn ๐Ÿ”’
Transform a relevant associated item to inline generics from the impl, remove attrs and docs, etc.
make_const_compl_syntax ๐Ÿ”’