Struct tailwind_css::TailwindError
source · pub struct TailwindError {
pub kind: Box<TailwindErrorKind>,
pub file: Option<PathBuf>,
pub range: Option<Range<usize>>,
}
Expand description
Error type for all tailwind operators
Fields§
§kind: Box<TailwindErrorKind>
Actual error kind
file: Option<PathBuf>
File name where error occurred
range: Option<Range<usize>>
Range offset where error occurred
Implementations§
source§impl 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
]
source§impl 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.
source§impl 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§
source§impl Debug for TailwindError
impl Debug for TailwindError
source§impl Display for TailwindError
impl Display for TailwindError
source§impl Error for TailwindError
impl Error for TailwindError
1.30.0 · source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<()> for TailwindError
impl From<()> for TailwindError
source§fn from(_: ()) -> TailwindError
fn from(_: ()) -> TailwindError
Converts to this type from the input type.
source§impl From<Error> for TailwindError
impl From<Error> for TailwindError
source§fn from(e: Error) -> TailwindError
fn from(e: Error) -> TailwindError
Converts to this type from the input type.
source§impl From<Error> for TailwindError
impl From<Error> for TailwindError
source§fn from(e: Error) -> TailwindError
fn from(e: Error) -> TailwindError
Converts to this type from the input type.
source§impl From<Infallible> for TailwindError
impl From<Infallible> for TailwindError
source§fn from(_: Infallible) -> TailwindError
fn from(_: Infallible) -> TailwindError
Converts to this type from the input type.
source§impl From<ParseColorError> for TailwindError
impl From<ParseColorError> for TailwindError
source§fn from(_: ParseColorError) -> TailwindError
fn from(_: ParseColorError) -> TailwindError
Converts to this type from the input type.
source§impl From<ParseFloatError> for TailwindError
impl From<ParseFloatError> for TailwindError
source§fn from(e: ParseFloatError) -> TailwindError
fn from(e: ParseFloatError) -> TailwindError
Converts to this type from the input type.
source§impl From<ParseIntError> for TailwindError
impl From<ParseIntError> for TailwindError
source§fn 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§
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