Skip to main content

CodeAssist

Trait CodeAssist 

Source
pub trait CodeAssist {
    // Provided methods
    fn complete(
        &mut self,
        doc: &CodeDoc,
        at: TextPos,
        explicit: bool,
    ) -> Option<CompList> { ... }
    fn hover(&mut self, doc: &CodeDoc, at: TextPos) -> Option<String> { ... }
    fn signature(&mut self, doc: &CodeDoc, at: TextPos) -> Option<SigHelp> { ... }
    fn triggers(&self) -> &str { ... }
}
Expand description

a language’s services for ui.code_editor_with (see the module header)

Provided Methods§

Source

fn complete( &mut self, doc: &CodeDoc, at: TextPos, explicit: bool, ) -> Option<CompList>

the items for the word at the caret at (explicit: Ctrl+Space)

Source

fn hover(&mut self, doc: &CodeDoc, at: TextPos) -> Option<String>

the tooltip text for the word at at

Source

fn signature(&mut self, doc: &CodeDoc, at: TextPos) -> Option<SigHelp>

signature help at the caret

Source

fn triggers(&self) -> &str

characters after which completion opens

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§