pub trait Backend: Clone + Send + Syncwhere
Self: 'static,{
Show 31 methods
// Required methods
fn client(&self) -> Client;
fn fs(&self) -> Arc<FileManager>;
fn is_initialized<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_is_initialized<'life0, 'async_trait>(
&'life0 self,
is_initialized: bool
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn current_handle<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<InnerHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_current_handle<'life0, 'async_trait>(
&'life0 self,
handle: Option<InnerHandle>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn workspace_folders<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Vec<WorkspaceFolder>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn add_workspace_folders<'life0, 'async_trait>(
&'life0 self,
folders: Vec<WorkspaceFolder>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_workspace_folders<'life0, 'async_trait>(
&'life0 self,
folders: Vec<WorkspaceFolder>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn code_map(&self) -> SafeMap<String, Vec<u8>>;
fn insert_code_map<'life0, 'async_trait>(
&'life0 self,
uri: String,
text: Vec<u8>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_from_code_map<'life0, 'async_trait>(
&'life0 self,
uri: String
) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn clear_code_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn current_diagnostics_map(
&self
) -> SafeMap<String, DocumentDiagnosticReport>;
fn inner_on_change<'life0, 'async_trait>(
&'life0 self,
params: TextDocumentItem,
force: bool
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn has_diagnostics<'life0, 'life1, 'async_trait>(
&'life0 self,
uri: &'life1 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn on_change<'life0, 'async_trait>(
&'life0 self,
params: TextDocumentItem
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn wait_on_handle<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn update_from_disk<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_initialized<'life0, 'async_trait>(
&'life0 self,
params: InitializedParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_shutdown<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_change_workspace_folders<'life0, 'async_trait>(
&'life0 self,
params: DidChangeWorkspaceFoldersParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_change_configuration<'life0, 'async_trait>(
&'life0 self,
params: DidChangeConfigurationParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_change_watched_files<'life0, 'async_trait>(
&'life0 self,
params: DidChangeWatchedFilesParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_create_files<'life0, 'async_trait>(
&'life0 self,
params: CreateFilesParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_rename_files<'life0, 'async_trait>(
&'life0 self,
params: RenameFilesParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_delete_files<'life0, 'async_trait>(
&'life0 self,
params: DeleteFilesParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_open<'life0, 'async_trait>(
&'life0 self,
params: DidOpenTextDocumentParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_change<'life0, 'async_trait>(
&'life0 self,
params: DidChangeTextDocumentParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_save<'life0, 'async_trait>(
&'life0 self,
params: DidSaveTextDocumentParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn do_did_close<'life0, 'async_trait>(
&'life0 self,
params: DidCloseTextDocumentParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
A trait for the backend of the language server.
Required Methods§
fn client(&self) -> Client
fn fs(&self) -> Arc<FileManager>
fn is_initialized<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_is_initialized<'life0, 'async_trait>(
&'life0 self,
is_initialized: bool
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_handle<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<InnerHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_current_handle<'life0, 'async_trait>(
&'life0 self,
handle: Option<InnerHandle>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn workspace_folders<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Vec<WorkspaceFolder>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_workspace_folders<'life0, 'async_trait>(
&'life0 self,
folders: Vec<WorkspaceFolder>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_workspace_folders<'life0, 'async_trait>(
&'life0 self,
folders: Vec<WorkspaceFolder>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn insert_code_map<'life0, 'async_trait>(
&'life0 self,
uri: String,
text: Vec<u8>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert_code_map<'life0, 'async_trait>(
&'life0 self,
uri: String,
text: Vec<u8>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert a new code map.
fn remove_from_code_map<'life0, 'async_trait>(
&'life0 self,
uri: String
) -> Pin<Box<dyn Future<Output = Option<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn clear_code_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_code_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clear the current code state.
sourcefn current_diagnostics_map(&self) -> SafeMap<String, DocumentDiagnosticReport>
fn current_diagnostics_map(&self) -> SafeMap<String, DocumentDiagnosticReport>
Get the current diagnostics map.
sourcefn inner_on_change<'life0, 'async_trait>(
&'life0 self,
params: TextDocumentItem,
force: bool
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn inner_on_change<'life0, 'async_trait>(
&'life0 self,
params: TextDocumentItem,
force: bool
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
On change event.
Provided Methods§
sourcefn has_diagnostics<'life0, 'life1, 'async_trait>(
&'life0 self,
uri: &'life1 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_diagnostics<'life0, 'life1, 'async_trait>(
&'life0 self,
uri: &'life1 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if the file has diagnostics.
fn on_change<'life0, 'async_trait>(
&'life0 self,
params: TextDocumentItem
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_on_handle<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_from_disk<'life0, 'async_trait, P>( &'life0 self, path: P ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn do_initialized<'life0, 'async_trait>(
&'life0 self,
params: InitializedParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_shutdown<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_change_workspace_folders<'life0, 'async_trait>(
&'life0 self,
params: DidChangeWorkspaceFoldersParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_change_configuration<'life0, 'async_trait>(
&'life0 self,
params: DidChangeConfigurationParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_change_watched_files<'life0, 'async_trait>(
&'life0 self,
params: DidChangeWatchedFilesParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_create_files<'life0, 'async_trait>(
&'life0 self,
params: CreateFilesParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_rename_files<'life0, 'async_trait>(
&'life0 self,
params: RenameFilesParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_delete_files<'life0, 'async_trait>(
&'life0 self,
params: DeleteFilesParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_open<'life0, 'async_trait>(
&'life0 self,
params: DidOpenTextDocumentParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_change<'life0, 'async_trait>(
&'life0 self,
params: DidChangeTextDocumentParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_save<'life0, 'async_trait>(
&'life0 self,
params: DidSaveTextDocumentParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn do_did_close<'life0, 'async_trait>(
&'life0 self,
params: DidCloseTextDocumentParams
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Object Safety§
This trait is not object safe.