Struct tailwind_error::TailwindError
source · [−]pub struct TailwindError {
pub kind: Box<TailwindErrorKind>,
pub level: DiagnosticLevel,
pub file: Option<Url>,
pub range: Option<Range<usize>>,
}
Expand description
Error type for all tailwind operators
Fields
kind: Box<TailwindErrorKind>
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
sourceimpl TailwindError
impl TailwindError
sourcepub fn incomplete() -> Self
pub fn incomplete() -> Self
Constructor of [NoteErrorKind::Incomplete
]
sourcepub fn unreachable() -> Self
pub fn unreachable() -> Self
Constructor of [NoteErrorKind::Unreachable
]
sourcepub fn undefined_variable(name: impl Into<String>) -> TailwindError
pub fn undefined_variable(name: impl Into<String>) -> TailwindError
Constructor of [NoteErrorKind::UndefinedVariable
]
sourceimpl TailwindError
impl TailwindError
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 TailwindError
impl TailwindError
sourcepub fn syntax_error(msg: impl Into<String>) -> TailwindError
pub fn syntax_error(msg: impl Into<String>) -> TailwindError
Constructor of [NoteErrorKind::$t
]
sourcepub fn type_mismatch(msg: impl Into<String>) -> TailwindError
pub fn type_mismatch(msg: impl Into<String>) -> TailwindError
Constructor of [NoteErrorKind::$t
]
sourcepub fn runtime_error(msg: impl Into<String>) -> TailwindError
pub fn runtime_error(msg: impl Into<String>) -> TailwindError
Constructor of [NoteErrorKind::$t
]
sourceimpl TailwindError
impl TailwindError
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 Debug for TailwindError
impl Debug for TailwindError
sourceimpl Display for TailwindError
impl Display for TailwindError
sourceimpl Error for TailwindError
impl Error for TailwindError
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 From<Error<MinifyErrorKind>> for TailwindError
impl From<Error<MinifyErrorKind>> for TailwindError
sourcefn from(e: Error<MinifyErrorKind>) -> Self
fn from(e: Error<MinifyErrorKind>) -> Self
Performs the conversion.
sourceimpl From<Error<ParserError<'_>>> for TailwindError
impl From<Error<ParserError<'_>>> for TailwindError
sourcefn from(e: Error<ParserError<'_>>) -> Self
fn from(e: Error<ParserError<'_>>) -> Self
Performs the conversion.
sourceimpl From<Error<PrinterErrorKind>> for TailwindError
impl From<Error<PrinterErrorKind>> for TailwindError
sourcefn from(e: Error<PrinterErrorKind>) -> Self
fn from(e: Error<PrinterErrorKind>) -> Self
Performs the conversion.
sourceimpl<R> From<Error<R>> for TailwindError where
R: Debug,
impl<R> From<Error<R>> for TailwindError where
R: Debug,
sourceimpl<R> From<ErrorVariant<R>> for TailwindError where
R: Debug,
impl<R> From<ErrorVariant<R>> for TailwindError where
R: Debug,
sourcefn from(e: ErrorVariant<R>) -> Self
fn from(e: ErrorVariant<R>) -> Self
Performs the conversion.
sourceimpl From<Infallible> for TailwindError
impl From<Infallible> for TailwindError
sourcefn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Performs the conversion.
sourceimpl From<ParseColorError> for TailwindError
impl From<ParseColorError> for TailwindError
sourcefn from(_: ParseColorError) -> Self
fn from(_: ParseColorError) -> Self
Performs the conversion.
sourceimpl From<ParseError> for TailwindError
impl From<ParseError> for TailwindError
sourcefn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Performs the conversion.
sourceimpl From<ParseError> for TailwindError
impl From<ParseError> for TailwindError
sourcefn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Performs the conversion.
sourceimpl From<TryFromBigIntError<BigInt>> for TailwindError
impl From<TryFromBigIntError<BigInt>> for TailwindError
sourcefn from(e: TryFromBigIntError<BigInt>) -> Self
fn from(e: TryFromBigIntError<BigInt>) -> Self
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for TailwindError
impl Send for TailwindError
impl Sync for TailwindError
impl Unpin for TailwindError
impl UnwindSafe for TailwindError
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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