Struct tailwind_css::TailwindError
source · [−]pub struct TailwindError {
pub kind: Box<TailwindErrorKind, Global>,
pub level: DiagnosticLevel,
pub file: Option<Url>,
pub range: Option<Range<usize>>,
}
Expand description
Error type for all tailwind operators
Fields
kind: Box<TailwindErrorKind, Global>
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 set_path(&mut self, url: &Path) -> Result<(), TailwindError>
pub fn set_path(&mut self, url: &Path) -> Result<(), TailwindError>
Set a local path for the error
sourcepub fn unreachable() -> TailwindError
pub fn unreachable() -> TailwindError
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
]
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<()> for TailwindError
impl From<()> for TailwindError
sourcepub fn from(()) -> TailwindError
pub fn from(()) -> TailwindError
Performs the conversion.
sourceimpl From<Err<Error<&'_ str>>> for TailwindError
impl From<Err<Error<&'_ str>>> for TailwindError
sourcepub fn from(e: Err<Error<&str>>) -> TailwindError
pub fn from(e: Err<Error<&str>>) -> TailwindError
Performs the conversion.
sourceimpl From<Error> for TailwindError
impl From<Error> for TailwindError
sourcepub fn from(e: Error) -> TailwindError
pub fn from(e: Error) -> TailwindError
Performs the conversion.
sourceimpl From<Error> for TailwindError
impl From<Error> for TailwindError
sourcepub fn from(e: Error) -> TailwindError
pub fn from(e: Error) -> TailwindError
Performs the conversion.
sourceimpl From<Infallible> for TailwindError
impl From<Infallible> for TailwindError
sourcepub fn from(Infallible) -> TailwindError
pub fn from(Infallible) -> TailwindError
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
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcepub fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
pub fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford method by default Read more
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
sourceimpl<T, U> IntoColor<U> for T where
U: FromColor<T>,
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
sourcepub fn into_color(self) -> U
pub fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
sourceimpl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
sourcepub fn into_color_unclamped(self) -> U
pub fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
sourceimpl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
sourcepub fn try_into_color(self) -> Result<U, OutOfBounds<U>>
pub fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more