pub struct ServerState {
pub config: Arc<RwLock<Config>>,
pub sessions: LruSessionCache,
pub documents: Documents,
pub is_compiling: Arc<AtomicBool>,
/* private fields */
}
Expand description
ServerState
is the primary mutable state of the language server
Fields§
§config: Arc<RwLock<Config>>
§sessions: LruSessionCache
A Least Recently Used (LRU) cache of Sessions, each representing a project opened in the user’s workspace. This cache limits memory usage by maintaining a fixed number of active sessions, automatically evicting the least recently used sessions when the capacity is reached.
documents: Documents
§is_compiling: Arc<AtomicBool>
Implementations§
Source§impl ServerState
impl ServerState
pub fn new(client: Client) -> ServerState
Sourcepub fn spawn_compilation_thread(&self)
pub fn spawn_compilation_thread(&self)
Spawns a new thread dedicated to handling compilation tasks. This thread listens for
TaskMessage
instances sent over a channel and processes them accordingly.
This approach allows for asynchronous compilation tasks to be handled in parallel to the main application flow, improving efficiency and responsiveness.
Sourcepub fn spawn_client_heartbeat(&self, client_pid: usize)
pub fn spawn_client_heartbeat(&self, client_pid: usize)
Spawns a new thread dedicated to checking if the client process is still active, and if not, shutting down the server.
Sourcepub async fn wait_for_parsing(&self)
pub async fn wait_for_parsing(&self)
Waits asynchronously for the is_compiling
flag to become false.
This function checks the state of is_compiling
, and if it’s true,
it awaits on a notification. Once notified, it checks again, repeating
this process until is_compiling
becomes false.
pub fn shutdown_server(&self) -> Result<()>
Sourcepub async fn uri_and_session_from_workspace(
&self,
workspace_uri: &Url,
) -> Result<(Url, Arc<Session>), LanguageServerError>
pub async fn uri_and_session_from_workspace( &self, workspace_uri: &Url, ) -> Result<(Url, Arc<Session>), LanguageServerError>
Constructs and returns a tuple of (Url, Arc<Session>)
from a given workspace URI.
The returned URL represents the temp directory workspace.
Source§impl ServerState
impl ServerState
pub async fn show_ast( &self, params: ShowAstParams, ) -> Result<Option<TextDocumentIdentifier>>
pub async fn on_enter( &self, params: OnEnterParams, ) -> Result<Option<WorkspaceEdit>>
pub async fn visualize(&self, params: VisualizeParams) -> Result<Option<String>>
pub async fn metrics( &self, params: MetricsParams, ) -> Result<Option<Vec<(String, PerformanceData)>>>
Trait Implementations§
Source§impl Default for ServerState
impl Default for ServerState
Source§impl LanguageServer for ServerState
impl LanguageServer for ServerState
Source§fn initialize<'life0, 'async_trait>(
&'life0 self,
params: InitializeParams,
) -> Pin<Box<dyn Future<Output = Result<InitializeResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
params: InitializeParams,
) -> Pin<Box<dyn Future<Output = Result<InitializeResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
initialize
request is the first request sent from the client to the server. Read moreSource§fn initialized<'life0, 'async_trait>(
&'life0 self,
__arg1: InitializedParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialized<'life0, 'async_trait>(
&'life0 self,
__arg1: InitializedParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
initialized
notification is sent from the client to the server after the client
received the result of the initialize request but before the client sends anything else. Read moreSource§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn 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 did_open<'life0, 'async_trait>(
&'life0 self,
params: DidOpenTextDocumentParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/didOpen
notification is sent from the client to the server to signal
that a new text document has been opened by the client. Read moreSource§fn did_close<'life0, 'async_trait>(
&'life0 self,
params: DidCloseTextDocumentParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn did_close<'life0, 'async_trait>(
&'life0 self,
params: DidCloseTextDocumentParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/didClose
notification is sent from the client to the server when the
document got closed in the client. Read moreSource§fn 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 did_change<'life0, 'async_trait>(
&'life0 self,
params: DidChangeTextDocumentParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/didChange
notification is sent from the client to the server to signal
changes to a text document. Read moreSource§fn 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 did_save<'life0, 'async_trait>(
&'life0 self,
params: DidSaveTextDocumentParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/didSave
notification is sent from the client to the server when the
document was saved in the client.Source§fn 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 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,
workspace/didChangeWatchedFiles
notification is sent from the client to the server
when the client detects changes to files watched by the language client. Read moreSource§fn hover<'life0, 'async_trait>(
&'life0 self,
params: HoverParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Hover>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn hover<'life0, 'async_trait>(
&'life0 self,
params: HoverParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Hover>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/hover
request asks the server for hover information at a given text
document position. Read moreSource§fn code_action<'life0, 'async_trait>(
&'life0 self,
params: CodeActionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<CodeActionResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn code_action<'life0, 'async_trait>(
&'life0 self,
params: CodeActionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<CodeActionResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/codeAction
request is sent from the client to the server to compute
commands for a given text document and range. These commands are typically code fixes to
either fix problems or to beautify/refactor code. Read moreSource§fn code_lens<'life0, 'async_trait>(
&'life0 self,
params: CodeLensParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CodeLens>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn code_lens<'life0, 'async_trait>(
&'life0 self,
params: CodeLensParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CodeLens>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/codeLens
request is sent from the client to the server to compute code
lenses for a given text document.Source§fn completion<'life0, 'async_trait>(
&'life0 self,
params: CompletionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<CompletionResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn completion<'life0, 'async_trait>(
&'life0 self,
params: CompletionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<CompletionResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/completion
request is sent from the client to the server to compute
completion items at a given cursor position. Read moreSource§fn document_symbol<'life0, 'async_trait>(
&'life0 self,
params: DocumentSymbolParams,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentSymbolResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn document_symbol<'life0, 'async_trait>(
&'life0 self,
params: DocumentSymbolParams,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentSymbolResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/documentSymbol
request is sent from the client to the server to
retrieve all symbols found in a given text document. Read moreSource§fn semantic_tokens_full<'life0, 'async_trait>(
&'life0 self,
params: SemanticTokensParams,
) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn semantic_tokens_full<'life0, 'async_trait>(
&'life0 self,
params: SemanticTokensParams,
) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/semanticTokens/full
request is sent from the client to the server to
resolve the semantic tokens of a given file. Read moreSource§fn semantic_tokens_range<'life0, 'async_trait>(
&'life0 self,
params: SemanticTokensRangeParams,
) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensRangeResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn semantic_tokens_range<'life0, 'async_trait>(
&'life0 self,
params: SemanticTokensRangeParams,
) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensRangeResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/semanticTokens/range
request is sent from the client to the server to
resolve the semantic tokens for the visible range of a given file. Read moreSource§fn document_highlight<'life0, 'async_trait>(
&'life0 self,
params: DocumentHighlightParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<DocumentHighlight>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn document_highlight<'life0, 'async_trait>(
&'life0 self,
params: DocumentHighlightParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<DocumentHighlight>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/documentHighlight
request is sent from the client to the server to
resolve appropriate highlights for a given text document position. Read moreSource§fn goto_definition<'life0, 'async_trait>(
&'life0 self,
params: GotoDefinitionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn goto_definition<'life0, 'async_trait>(
&'life0 self,
params: GotoDefinitionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/definition
request asks the server for the definition location of a
symbol at a given text document position. Read moreSource§fn formatting<'life0, 'async_trait>(
&'life0 self,
params: DocumentFormattingParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn formatting<'life0, 'async_trait>(
&'life0 self,
params: DocumentFormattingParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/formatting
request is sent from the client to the server to format a
whole document.Source§fn rename<'life0, 'async_trait>(
&'life0 self,
params: RenameParams,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rename<'life0, 'async_trait>(
&'life0 self,
params: RenameParams,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/rename
request is sent from the client to the server to ask the server
to compute a workspace change so that the client can perform a workspace-wide rename of a
symbol.Source§fn prepare_rename<'life0, 'async_trait>(
&'life0 self,
params: TextDocumentPositionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<PrepareRenameResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare_rename<'life0, 'async_trait>(
&'life0 self,
params: TextDocumentPositionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<PrepareRenameResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/prepareRename
request is sent from the client to the server to setup
and test the validity of a rename operation at a given location. Read moreSource§fn inlay_hint<'life0, 'async_trait>(
&'life0 self,
params: InlayHintParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<InlayHint>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn inlay_hint<'life0, 'async_trait>(
&'life0 self,
params: InlayHintParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<InlayHint>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/inlayHint
request is sent from the client to the server to compute
inlay hints for a given (text document, range)
tuple that may be rendered in the editor
in place with other text. Read moreSource§fn references<'life0, 'async_trait>(
&'life0 self,
params: ReferenceParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Location>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn references<'life0, 'async_trait>(
&'life0 self,
params: ReferenceParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Location>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
textDocument/references
request is sent from the client to the server to resolve
project-wide references for the symbol denoted by the given text document position.Source§fn will_save<'life0, 'async_trait>(
&'life0 self,
params: WillSaveTextDocumentParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn will_save<'life0, 'async_trait>(
&'life0 self,
params: WillSaveTextDocumentParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/willSave
notification is sent from the client to the server before the
document is actually saved.Source§fn will_save_wait_until<'life0, 'async_trait>(
&'life0 self,
params: WillSaveTextDocumentParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn will_save_wait_until<'life0, 'async_trait>(
&'life0 self,
params: WillSaveTextDocumentParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/willSaveWaitUntil
request is sent from the client to the server before
the document is actually saved. Read moreSource§fn goto_declaration<'life0, 'async_trait>(
&'life0 self,
params: GotoDefinitionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn goto_declaration<'life0, 'async_trait>(
&'life0 self,
params: GotoDefinitionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/declaration
request asks the server for the declaration location of a
symbol at a given text document position. Read moreSource§fn goto_type_definition<'life0, 'async_trait>(
&'life0 self,
params: GotoDefinitionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn goto_type_definition<'life0, 'async_trait>(
&'life0 self,
params: GotoDefinitionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/typeDefinition
request asks the server for the type definition location of
a symbol at a given text document position. Read moreSource§fn goto_implementation<'life0, 'async_trait>(
&'life0 self,
params: GotoDefinitionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn goto_implementation<'life0, 'async_trait>(
&'life0 self,
params: GotoDefinitionParams,
) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/implementation
request is sent from the client to the server to resolve
the implementation location of a symbol at a given text document position. Read moreSource§fn prepare_call_hierarchy<'life0, 'async_trait>(
&'life0 self,
params: CallHierarchyPrepareParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyItem>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn prepare_call_hierarchy<'life0, 'async_trait>(
&'life0 self,
params: CallHierarchyPrepareParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyItem>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/prepareCallHierarchy
request is sent from the client to the server to
return a call hierarchy for the language element of given text document positions. Read moreSource§fn incoming_calls<'life0, 'async_trait>(
&'life0 self,
params: CallHierarchyIncomingCallsParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyIncomingCall>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn incoming_calls<'life0, 'async_trait>(
&'life0 self,
params: CallHierarchyIncomingCallsParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyIncomingCall>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
callHierarchy/incomingCalls
request is sent from the client to the server to
resolve incoming calls for a given call hierarchy item. Read moreSource§fn outgoing_calls<'life0, 'async_trait>(
&'life0 self,
params: CallHierarchyOutgoingCallsParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyOutgoingCall>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn outgoing_calls<'life0, 'async_trait>(
&'life0 self,
params: CallHierarchyOutgoingCallsParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyOutgoingCall>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
callHierarchy/outgoingCalls
request is sent from the client to the server to
resolve outgoing calls for a given call hierarchy item. Read moreSource§fn prepare_type_hierarchy<'life0, 'async_trait>(
&'life0 self,
params: TypeHierarchyPrepareParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn prepare_type_hierarchy<'life0, 'async_trait>(
&'life0 self,
params: TypeHierarchyPrepareParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/prepareTypeHierarchy
request is sent from the client to the server to
return a type hierarchy for the language element of given text document positions. Read moreSource§fn supertypes<'life0, 'async_trait>(
&'life0 self,
params: TypeHierarchySupertypesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn supertypes<'life0, 'async_trait>(
&'life0 self,
params: TypeHierarchySupertypesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
typeHierarchy/supertypes
] request is sent from the client to the server to resolve
the supertypes for a given type hierarchy item. Read moreSource§fn subtypes<'life0, 'async_trait>(
&'life0 self,
params: TypeHierarchySubtypesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn subtypes<'life0, 'async_trait>(
&'life0 self,
params: TypeHierarchySubtypesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
typeHierarchy/subtypes
] request is sent from the client to the server to resolve
the subtypes for a given type hierarchy item. Read moreSource§fn document_link<'life0, 'async_trait>(
&'life0 self,
params: DocumentLinkParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<DocumentLink>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn document_link<'life0, 'async_trait>(
&'life0 self,
params: DocumentLinkParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<DocumentLink>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/documentLink
request is sent from the client to the server to request
the location of links in a document. Read moreSource§fn document_link_resolve<'life0, 'async_trait>(
&'life0 self,
params: DocumentLink,
) -> Pin<Box<dyn Future<Output = Result<DocumentLink, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn document_link_resolve<'life0, 'async_trait>(
&'life0 self,
params: DocumentLink,
) -> Pin<Box<dyn Future<Output = Result<DocumentLink, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
documentLink/resolve
request is sent from the client to the server to resolve the
target of a given document link. Read moreSource§fn code_lens_resolve<'life0, 'async_trait>(
&'life0 self,
params: CodeLens,
) -> Pin<Box<dyn Future<Output = Result<CodeLens, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn code_lens_resolve<'life0, 'async_trait>(
&'life0 self,
params: CodeLens,
) -> Pin<Box<dyn Future<Output = Result<CodeLens, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
codeLens/resolve
request is sent from the client to the server to resolve the
command for a given code lens item.Source§fn folding_range<'life0, 'async_trait>(
&'life0 self,
params: FoldingRangeParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<FoldingRange>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn folding_range<'life0, 'async_trait>(
&'life0 self,
params: FoldingRangeParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<FoldingRange>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/foldingRange
request is sent from the client to the server to return
all folding ranges found in a given text document. Read moreSource§fn selection_range<'life0, 'async_trait>(
&'life0 self,
params: SelectionRangeParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SelectionRange>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn selection_range<'life0, 'async_trait>(
&'life0 self,
params: SelectionRangeParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SelectionRange>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/selectionRange
request is sent from the client to the server to return
suggested selection ranges at an array of given positions. A selection range is a range
around the cursor position which the user might be interested in selecting. Read moreSource§fn semantic_tokens_full_delta<'life0, 'async_trait>(
&'life0 self,
params: SemanticTokensDeltaParams,
) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensFullDeltaResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn semantic_tokens_full_delta<'life0, 'async_trait>(
&'life0 self,
params: SemanticTokensDeltaParams,
) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensFullDeltaResult>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/semanticTokens/full/delta
request is sent from the client to the server to
resolve the semantic tokens of a given file, returning only the delta. Read moreSource§fn inline_value<'life0, 'async_trait>(
&'life0 self,
params: InlineValueParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<InlineValue>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn inline_value<'life0, 'async_trait>(
&'life0 self,
params: InlineValueParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<InlineValue>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/inlineValue
request is sent from the client to the server to compute
inline values for a given text document that may be rendered in the editor at the end of
lines. Read moreSource§fn inlay_hint_resolve<'life0, 'async_trait>(
&'life0 self,
params: InlayHint,
) -> Pin<Box<dyn Future<Output = Result<InlayHint, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn inlay_hint_resolve<'life0, 'async_trait>(
&'life0 self,
params: InlayHint,
) -> Pin<Box<dyn Future<Output = Result<InlayHint, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
inlayHint/resolve
request is sent from the client to the server to resolve
additional information for a given inlay hint. Read moreSource§fn moniker<'life0, 'async_trait>(
&'life0 self,
params: MonikerParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Moniker>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn moniker<'life0, 'async_trait>(
&'life0 self,
params: MonikerParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Moniker>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/moniker
request is sent from the client to the server to get the
symbol monikers for a given text document position. Read moreSource§fn completion_resolve<'life0, 'async_trait>(
&'life0 self,
params: CompletionItem,
) -> Pin<Box<dyn Future<Output = Result<CompletionItem, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn completion_resolve<'life0, 'async_trait>(
&'life0 self,
params: CompletionItem,
) -> Pin<Box<dyn Future<Output = Result<CompletionItem, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
completionItem/resolve
request is sent from the client to the server to resolve
additional information for a given completion item.Source§fn diagnostic<'life0, 'async_trait>(
&'life0 self,
params: DocumentDiagnosticParams,
) -> Pin<Box<dyn Future<Output = Result<DocumentDiagnosticReportResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn diagnostic<'life0, 'async_trait>(
&'life0 self,
params: DocumentDiagnosticParams,
) -> Pin<Box<dyn Future<Output = Result<DocumentDiagnosticReportResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/diagnostic
request is sent from the client to the server to ask the
server to compute the diagnostics for a given document. Read moreSource§fn workspace_diagnostic<'life0, 'async_trait>(
&'life0 self,
params: WorkspaceDiagnosticParams,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceDiagnosticReportResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn workspace_diagnostic<'life0, 'async_trait>(
&'life0 self,
params: WorkspaceDiagnosticParams,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceDiagnosticReportResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/diagnostic
request is sent from the client to the server to ask the
server to compute workspace wide diagnostics which previously where pushed from the server
to the client. Read moreSource§fn signature_help<'life0, 'async_trait>(
&'life0 self,
params: SignatureHelpParams,
) -> Pin<Box<dyn Future<Output = Result<Option<SignatureHelp>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn signature_help<'life0, 'async_trait>(
&'life0 self,
params: SignatureHelpParams,
) -> Pin<Box<dyn Future<Output = Result<Option<SignatureHelp>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/signatureHelp
request is sent from the client to the server to request
signature information at a given cursor position.Source§fn code_action_resolve<'life0, 'async_trait>(
&'life0 self,
params: CodeAction,
) -> Pin<Box<dyn Future<Output = Result<CodeAction, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn code_action_resolve<'life0, 'async_trait>(
&'life0 self,
params: CodeAction,
) -> Pin<Box<dyn Future<Output = Result<CodeAction, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
codeAction/resolve
request is sent from the client to the server to resolve
additional information for a given code action. Read moreSource§fn document_color<'life0, 'async_trait>(
&'life0 self,
params: DocumentColorParams,
) -> Pin<Box<dyn Future<Output = Result<Vec<ColorInformation>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn document_color<'life0, 'async_trait>(
&'life0 self,
params: DocumentColorParams,
) -> Pin<Box<dyn Future<Output = Result<Vec<ColorInformation>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/documentColor
request is sent from the client to the server to list
all color references found in a given text document. Along with the range, a color value in
RGB is returned. Read moreSource§fn color_presentation<'life0, 'async_trait>(
&'life0 self,
params: ColorPresentationParams,
) -> Pin<Box<dyn Future<Output = Result<Vec<ColorPresentation>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn color_presentation<'life0, 'async_trait>(
&'life0 self,
params: ColorPresentationParams,
) -> Pin<Box<dyn Future<Output = Result<Vec<ColorPresentation>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/colorPresentation
request is sent from the client to the server to
obtain a list of presentations for a color value at a given location. Read moreSource§fn range_formatting<'life0, 'async_trait>(
&'life0 self,
params: DocumentRangeFormattingParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn range_formatting<'life0, 'async_trait>(
&'life0 self,
params: DocumentRangeFormattingParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/rangeFormatting
request is sent from the client to the server to
format a given range in a document.Source§fn on_type_formatting<'life0, 'async_trait>(
&'life0 self,
params: DocumentOnTypeFormattingParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_type_formatting<'life0, 'async_trait>(
&'life0 self,
params: DocumentOnTypeFormattingParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/onTypeFormatting
request is sent from the client to the server to
format parts of the document during typing.Source§fn linked_editing_range<'life0, 'async_trait>(
&'life0 self,
params: LinkedEditingRangeParams,
) -> Pin<Box<dyn Future<Output = Result<Option<LinkedEditingRanges>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn linked_editing_range<'life0, 'async_trait>(
&'life0 self,
params: LinkedEditingRangeParams,
) -> Pin<Box<dyn Future<Output = Result<Option<LinkedEditingRanges>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
textDocument/linkedEditingRange
request is sent from the client to the server to
return for a given position in a document the range of the symbol at the position and all
ranges that have the same content. Read moreSource§fn symbol<'life0, 'async_trait>(
&'life0 self,
params: WorkspaceSymbolParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SymbolInformation>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn symbol<'life0, 'async_trait>(
&'life0 self,
params: WorkspaceSymbolParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SymbolInformation>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/symbol
request is sent from the client to the server to list project-wide
symbols matching the given query string. Read moreSource§fn symbol_resolve<'life0, 'async_trait>(
&'life0 self,
params: WorkspaceSymbol,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceSymbol, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn symbol_resolve<'life0, 'async_trait>(
&'life0 self,
params: WorkspaceSymbol,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceSymbol, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspaceSymbol/resolve
request is sent from the client to the server to resolve
additional information for a given workspace symbol. Read moreSource§fn did_change_configuration<'life0, 'async_trait>(
&'life0 self,
params: DidChangeConfigurationParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn did_change_configuration<'life0, 'async_trait>(
&'life0 self,
params: DidChangeConfigurationParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/didChangeConfiguration
notification is sent from the client to the server
to signal the change of configuration settings.Source§fn did_change_workspace_folders<'life0, 'async_trait>(
&'life0 self,
params: DidChangeWorkspaceFoldersParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn did_change_workspace_folders<'life0, 'async_trait>(
&'life0 self,
params: DidChangeWorkspaceFoldersParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/didChangeWorkspaceFolders
notification is sent from the client to the
server to inform about workspace folder configuration changes. Read moreSource§fn will_create_files<'life0, 'async_trait>(
&'life0 self,
params: CreateFilesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn will_create_files<'life0, 'async_trait>(
&'life0 self,
params: CreateFilesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/willCreateFiles
request is sent from the client to the server before
files are actually created as long as the creation is triggered from within the client. Read moreSource§fn did_create_files<'life0, 'async_trait>(
&'life0 self,
params: CreateFilesParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn did_create_files<'life0, 'async_trait>(
&'life0 self,
params: CreateFilesParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/didCreateFiles
request is sent from the client to the server when files
were created from within the client.Source§fn will_rename_files<'life0, 'async_trait>(
&'life0 self,
params: RenameFilesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn will_rename_files<'life0, 'async_trait>(
&'life0 self,
params: RenameFilesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/willRenameFiles
request is sent from the client to the server before
files are actually renamed as long as the rename is triggered from within the client. Read moreSource§fn did_rename_files<'life0, 'async_trait>(
&'life0 self,
params: RenameFilesParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn did_rename_files<'life0, 'async_trait>(
&'life0 self,
params: RenameFilesParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/didRenameFiles
notification is sent from the client to the server when
files were renamed from within the client.Source§fn will_delete_files<'life0, 'async_trait>(
&'life0 self,
params: DeleteFilesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn will_delete_files<'life0, 'async_trait>(
&'life0 self,
params: DeleteFilesParams,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/willDeleteFiles
request is sent from the client to the server before
files are actually deleted as long as the deletion is triggered from within the client
either by a user action or by applying a workspace edit. Read moreSource§fn did_delete_files<'life0, 'async_trait>(
&'life0 self,
params: DeleteFilesParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn did_delete_files<'life0, 'async_trait>(
&'life0 self,
params: DeleteFilesParams,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/didDeleteFiles
notification is sent from the client to the server when
files were deleted from within the client.Source§fn execute_command<'life0, 'async_trait>(
&'life0 self,
params: ExecuteCommandParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn execute_command<'life0, 'async_trait>(
&'life0 self,
params: ExecuteCommandParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
workspace/executeCommand
request is sent from the client to the server to trigger
command execution on the server. Read moreAuto Trait Implementations§
impl Freeze for ServerState
impl !RefUnwindSafe for ServerState
impl Send for ServerState
impl Sync for ServerState
impl Unpin for ServerState
impl !UnwindSafe for ServerState
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> StorageAsMut for T
impl<T> StorageAsMut for T
fn storage<Type>(&mut self) -> StorageMut<'_, Self, Type>where
Type: Mappable,
fn storage_as_mut<Type>(&mut self) -> StorageMut<'_, Self, Type>where
Type: Mappable,
Source§impl<T> StorageAsRef for T
impl<T> StorageAsRef for T
fn storage<Type>(&self) -> StorageRef<'_, Self, Type>where
Type: Mappable,
fn storage_as_ref<Type>(&self) -> StorageRef<'_, Self, Type>where
Type: Mappable,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.