Struct tailwind_css::TailwindError
source · [−]pub struct TailwindError {
pub kind: Box<TailwindErrorKind, Global>,
pub file: Option<PathBuf>,
pub range: Option<Range<usize>>,
}
Expand description
Error type for all tailwind operators
Fields
kind: Box<TailwindErrorKind, Global>
Actual error kind
file: Option<PathBuf>
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 incomplete() -> TailwindError
pub fn incomplete() -> TailwindError
Constructor of [NoteErrorKind::Incomplete
]
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
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<()> for TailwindError
impl From<()> for TailwindError
sourcefn from(()) -> TailwindError
fn from(()) -> TailwindError
Converts to this type from the input type.
sourceimpl From<Error> for TailwindError
impl From<Error> for TailwindError
sourcefn from(e: Error) -> TailwindError
fn from(e: Error) -> TailwindError
Converts to this type from the input type.
sourceimpl From<Error> for TailwindError
impl From<Error> for TailwindError
sourcefn from(e: Error) -> TailwindError
fn from(e: Error) -> TailwindError
Converts to this type from the input type.
sourceimpl From<Infallible> for TailwindError
impl From<Infallible> for TailwindError
sourcefn from(Infallible) -> TailwindError
fn from(Infallible) -> TailwindError
Converts to this type from the input type.
sourceimpl From<ParseColorError> for TailwindError
impl From<ParseColorError> for TailwindError
sourcefn from(ParseColorError) -> TailwindError
fn from(ParseColorError) -> TailwindError
Converts to this type from the input type.
sourceimpl From<ParseFloatError> for TailwindError
impl From<ParseFloatError> for TailwindError
sourcefn from(e: ParseFloatError) -> TailwindError
fn from(e: ParseFloatError) -> TailwindError
Converts to this type from the input type.
sourceimpl From<ParseIntError> for TailwindError
impl From<ParseIntError> for TailwindError
sourcefn from(e: ParseIntError) -> TailwindError
fn from(e: ParseIntError) -> TailwindError
Converts to this type from the input type.
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<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more