pub struct CssError {
pub kind: CssErrorKind,
pub loc: Option<Loc>,
}Expand description
Fields§
§kind: CssErrorKind§loc: Option<Loc>Implementations§
Source§impl CssError
impl CssError
Sourcepub fn from_kind(kind: CssErrorKind) -> Self
pub fn from_kind(kind: CssErrorKind) -> Self
Construct from an explicit kind with no location.
pub fn invalid_color(msg: impl Into<String>) -> Self
pub fn invalid_selector(msg: impl Into<String>) -> Self
pub fn invalid_length(msg: impl Into<String>) -> Self
pub fn undefined_variable(msg: impl Into<String>) -> Self
pub fn circular_variable(msg: impl Into<String>) -> Self
Sourcepub fn unknown_property(msg: impl Into<String>) -> Self
pub fn unknown_property(msg: impl Into<String>) -> Self
(Strict mode only.) An unknown CSS property was used.
pub fn io(msg: impl Into<String>) -> Self
Sourcepub fn at(self, line: u32, column: u32) -> Self
pub fn at(self, line: u32, column: u32) -> Self
Attach a 1-based line:column to this error, returning it for chaining.
Sourcepub fn kind(&self) -> &CssErrorKind
pub fn kind(&self) -> &CssErrorKind
A reference to the CssErrorKind this wraps.
Trait Implementations§
impl Eq for CssError
Source§impl Error for CssError
impl Error for CssError
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()
impl StructuralPartialEq for CssError
Auto Trait Implementations§
impl Freeze for CssError
impl RefUnwindSafe for CssError
impl Send for CssError
impl Sync for CssError
impl Unpin for CssError
impl UnsafeUnpin for CssError
impl UnwindSafe for CssError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more