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)>
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<()> 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 Freeze for TailwindError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more