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: DiagnosticLevel
Error level for report
file: Option<Url>
File name where error occurred
range: Option<Range<usize>>
Range offset where error occurred
Implementations§
Source§impl 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
]
Source§impl 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.
Source§impl 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
]
Source§impl 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§
Source§impl Error for DokiError
impl Error for DokiError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ConfigError> for DokiError
impl From<ConfigError> for DokiError
Source§fn from(e: ConfigError) -> Self
fn from(e: ConfigError) -> Self
Converts to this type from the input type.
Source§impl<R> From<ErrorVariant<R>> for DokiErrorwhere
R: Debug,
impl<R> From<ErrorVariant<R>> for DokiErrorwhere
R: Debug,
Source§fn from(e: ErrorVariant<R>) -> Self
fn from(e: ErrorVariant<R>) -> Self
Converts to this type from the input type.
Source§impl From<Infallible> for DokiError
impl From<Infallible> for DokiError
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for DokiError
impl From<ParseError> for DokiError
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for DokiError
impl From<ParseError> for DokiError
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DokiError
impl !RefUnwindSafe for DokiError
impl Send for DokiError
impl Sync for DokiError
impl Unpin for DokiError
impl !UnwindSafe for DokiError
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