pub struct ResponseFormatter;Expand description
Response formatter for IDE responses
Implementations§
Source§impl ResponseFormatter
impl ResponseFormatter
Sourcepub fn format_completions(items: &[CompletionItem]) -> Value
pub fn format_completions(items: &[CompletionItem]) -> Value
Format completion items for IDE consumption
Sourcepub fn format_diagnostics(diagnostics: &[Diagnostic]) -> Value
pub fn format_diagnostics(diagnostics: &[Diagnostic]) -> Value
Format diagnostics for IDE display
Sourcepub fn format_hover(hover: &Option<Hover>) -> Value
pub fn format_hover(hover: &Option<Hover>) -> Value
Format hover information for IDE display
Sourcepub fn format_definition(location: &Option<Location>) -> Value
pub fn format_definition(location: &Option<Location>) -> Value
Format definition location for IDE navigation
Sourcepub fn format_for_vscode(response_type: &str, data: Value) -> Value
pub fn format_for_vscode(response_type: &str, data: Value) -> Value
Format response for VS Code
Sourcepub fn format_for_terminal(response_type: &str, data: Value) -> Value
pub fn format_for_terminal(response_type: &str, data: Value) -> Value
Format response for terminal editors
Sourcepub fn format_error(code: i32, message: &str) -> Value
pub fn format_error(code: i32, message: &str) -> Value
Format error response
Auto Trait Implementations§
impl Freeze for ResponseFormatter
impl RefUnwindSafe for ResponseFormatter
impl Send for ResponseFormatter
impl Sync for ResponseFormatter
impl Unpin for ResponseFormatter
impl UnwindSafe for ResponseFormatter
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
Mutably borrows from an owned value. Read more
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>
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 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>
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