Skip to main content

Server

Struct Server 

Source
pub struct Server { /* private fields */ }

Implementations§

Source§

impl Server

Source

pub fn new(config: ServerConfig) -> Server

Source

pub fn graph(&self) -> impl DatabaseContext + '_

Source

pub fn apply_external_update(&mut self, key: Key, content: String)

Source

pub fn apply_external_removal(&mut self, key: Key)

Source

pub fn handle_did_open_text_document( &mut self, params: DidOpenTextDocumentParams, )

Source

pub fn handle_did_close_text_document( &mut self, params: DidCloseTextDocumentParams, )

Source

pub fn handle_hover(&self, params: HoverParams) -> Option<Hover>

Source

pub fn handle_did_save_text_document( &mut self, params: DidSaveTextDocumentParams, )

Source

pub fn handle_did_change_text_document( &mut self, params: DidChangeTextDocumentParams, )

Source

pub fn handle_did_change_watched_files( &mut self, params: DidChangeWatchedFilesParams, )

Source

pub fn handle_completion(&self, params: CompletionParams) -> CompletionResponse

Source

pub fn resolve_completion(&self, completion: CompletionItem) -> CompletionItem

Source

pub fn handle_workspace_symbols( &self, params: WorkspaceSymbolParams, ) -> WorkspaceSymbolResponse

Source

pub fn handle_goto_definition( &self, params: GotoDefinitionParams, ) -> DefinitionResult

Source

pub fn handle_document_formatting( &self, params: DocumentFormattingParams, ) -> Vec<TextEdit>

Source

pub fn handle_inlay_hints(&self, params: InlayHintParams) -> Vec<InlayHint>

Source

pub fn inclusion_edge_hints(&self, key: &Key) -> Vec<InlayHint>

Source

pub fn container_hint(&self, key: &Key) -> Vec<InlayHint>

Source

pub fn refs_counter_hints(&self, key: &Key) -> Vec<InlayHint>

Source

pub fn handle_inline_values(&self, _: InlineValueParams) -> Vec<InlineValue>

Source

pub fn handle_document_symbols( &self, params: DocumentSymbolParams, ) -> Vec<SymbolInformation>

Source

pub fn handle_prepare_rename( &self, params: TextDocumentPositionParams, ) -> Option<PrepareRenameResponse>

Source

pub fn handle_rename( &self, params: RenameParams, ) -> Result<Option<WorkspaceEdit>, ResponseError>

Source

pub fn handle_references(&self, params: ReferenceParams) -> Vec<Location>

Source

pub fn handle_code_action( &self, params: &CodeActionParams, ) -> CodeActionResponse

Source

pub fn handle_code_action_resolve(&self, code_action: &CodeAction) -> CodeAction

Source

pub fn handle_folding_range( &self, params: FoldingRangeParams, ) -> Vec<FoldingRange>

Trait Implementations§

Source§

impl ActionContext for &Server

Source§

fn key_of(&self, node_id: NodeId) -> Key

Source§

fn collect(&self, key: &Key) -> Tree

Source§

fn squash(&self, key: &Key, depth: u8) -> Tree

Source§

fn random_key(&self, parent: &str) -> Key

Source§

fn markdown_options(&self) -> &MarkdownOptions

Source§

fn format_options(&self) -> FormatOptions

Source§

fn get_command(&self, name: &str) -> Option<&Command>

Source§

fn graph(&self) -> &Graph

Source§

fn patch(&self) -> Graph

Source§

fn key_exists(&self, key: &Key) -> bool

Source§

fn get_inclusion_edges_to(&self, key: &Key) -> Vec<NodeId>

Source§

fn get_reference_edges_to(&self, key: &Key) -> Vec<NodeId>

Source§

fn get_ref_text(&self, key: &Key) -> Option<String>

Source§

fn unique_ids(&self, parent: &str, number: usize) -> Vec<String>

Source§

fn random_keys(&self, parent: &str, number: usize) -> Vec<Key>

Source§

fn get_node_id_at(&self, key: &Key, line: usize) -> Option<NodeId>

Source§

fn get_document_markdown(&self, key: &Key) -> Option<String>

Source§

fn now(&self) -> SystemTime

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V