pub struct LspErrorRenderer { /* private fields */ }Expand description
LSP Error Renderer - converts structured errors to LSP Diagnostics
Implementations§
Source§impl LspErrorRenderer
impl LspErrorRenderer
pub fn new(uri: Uri) -> Self
Sourcepub fn structured_error_to_diagnostic(
&self,
error: &StructuredParseError,
) -> Diagnostic
pub fn structured_error_to_diagnostic( &self, error: &StructuredParseError, ) -> Diagnostic
Convert a structured error to an LSP diagnostic
Trait Implementations§
Source§impl ErrorRenderer for LspErrorRenderer
impl ErrorRenderer for LspErrorRenderer
type Output = Vec<Diagnostic>
Source§fn render(&self, error: &StructuredParseError) -> Self::Output
fn render(&self, error: &StructuredParseError) -> Self::Output
Render a single error
Source§fn render_all(&self, errors: &[StructuredParseError]) -> Self::Output
fn render_all(&self, errors: &[StructuredParseError]) -> Self::Output
Render multiple errors
Auto Trait Implementations§
impl Freeze for LspErrorRenderer
impl RefUnwindSafe for LspErrorRenderer
impl Send for LspErrorRenderer
impl Sync for LspErrorRenderer
impl Unpin for LspErrorRenderer
impl UnsafeUnpin for LspErrorRenderer
impl UnwindSafe for LspErrorRenderer
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