Struct doki_error::DokiError
source · [−]pub struct DokiError {
pub kind: Box<DokiErrorKind>,
pub level: DiagnosticLevel,
pub file: Option<Url>,
pub range: Option<Range<usize>>,
}Expand description
Error type for all tailwind operators
Fields
kind: Box<DokiErrorKind>Actual error kind
level: DiagnosticLevelError level for report
file: Option<Url>File name where error occurred
range: Option<Range<usize>>Range offset where error occurred
Implementations
sourceimpl DokiError
impl DokiError
sourcepub fn unreachable() -> Self
pub fn unreachable() -> Self
Constructor of [NoteErrorKind::Unreachable]
sourcepub fn undefined_variable(name: impl Into<String>) -> DokiError
pub fn undefined_variable(name: impl Into<String>) -> DokiError
Constructor of [NoteErrorKind::UndefinedVariable]
sourceimpl DokiError
impl DokiError
sourcepub fn is_deprecated(&self) -> bool
pub fn is_deprecated(&self) -> bool
Deprecated or obsolete code. Clients are allowed to rendered diagnostics with this tag strike through.
sourcepub fn is_unnecessary(&self) -> bool
pub fn is_unnecessary(&self) -> bool
Unused or unnecessary code. Clients are allowed to render diagnostics with this tag faded out instead of having an error squiggle.
sourceimpl DokiError
impl DokiError
sourcepub fn syntax_error(msg: impl Into<String>) -> DokiError
pub fn syntax_error(msg: impl Into<String>) -> DokiError
Constructor of [NoteErrorKind::$t]
sourcepub fn type_mismatch(msg: impl Into<String>) -> DokiError
pub fn type_mismatch(msg: impl Into<String>) -> DokiError
Constructor of [NoteErrorKind::$t]
sourcepub fn runtime_error(msg: impl Into<String>) -> DokiError
pub fn runtime_error(msg: impl Into<String>) -> DokiError
Constructor of [NoteErrorKind::$t]
sourceimpl DokiError
impl DokiError
Get the tags as DiagnosticTag
sourcepub fn as_lsp_diagnostic(&self, text: &TextIndex) -> Diagnostic
pub fn as_lsp_diagnostic(&self, text: &TextIndex) -> Diagnostic
Convert error to lsp Diagnostic
Trait Implementations
sourceimpl Error for DokiError
impl Error for DokiError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<R> From<ErrorVariant<R>> for DokiError where
R: Debug,
impl<R> From<ErrorVariant<R>> for DokiError where
R: Debug,
sourcefn from(e: ErrorVariant<R>) -> Self
fn from(e: ErrorVariant<R>) -> Self
Performs the conversion.
sourceimpl From<Infallible> for DokiError
impl From<Infallible> for DokiError
sourcefn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Performs the conversion.
sourceimpl From<ParseError> for DokiError
impl From<ParseError> for DokiError
sourcefn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Performs the conversion.
sourceimpl From<ParseError> for DokiError
impl From<ParseError> for DokiError
sourcefn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Performs the conversion.
sourceimpl From<TryFromBigIntError<BigInt>> for DokiError
impl From<TryFromBigIntError<BigInt>> for DokiError
sourcefn from(e: TryFromBigIntError<BigInt>) -> Self
fn from(e: TryFromBigIntError<BigInt>) -> Self
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for DokiError
impl Send for DokiError
impl Sync for DokiError
impl Unpin for DokiError
impl !UnwindSafe for DokiError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more