pub enum PaletteError {
Show 14 variants
Parse(Error),
Io {
path: Arc<str>,
source: Error,
},
MissingBase,
MissingMeta,
InvalidHex {
section: Arc<str>,
field: Arc<str>,
value: Arc<str>,
},
InvalidStyle {
section: Arc<str>,
field: Arc<str>,
value: Arc<str>,
},
UnknownField {
section: Arc<str>,
field: Arc<str>,
},
UnknownPreset(Arc<str>),
InsufficientStops {
count: usize,
},
UnsortedStops,
InvalidGradientPosition {
position: f64,
},
MixedGradientStopKinds {
gradient: Arc<str>,
},
InvalidGradientRef {
gradient: Arc<str>,
stop_index: usize,
reference: Arc<str>,
},
InvalidColorSpace {
gradient: Arc<str>,
value: Arc<str>,
},
}Expand description
Errors produced when loading or parsing theme manifests.
Variants§
Parse(Error)
TOML deserialization failed.
Io
File read failed.
MissingBase
Manifest has no [base] section.
MissingMeta
Manifest has no [meta] section (required for registry).
InvalidHex
A hex color string in the manifest is malformed.
Fields
InvalidStyle
A style modifier string in the manifest is malformed.
Fields
UnknownField
A field key in the manifest is not recognized for its section.
Fields
UnknownPreset(Arc<str>)
No built-in or registered preset matches the given ID.
InsufficientStops
A gradient has fewer than 2 color stops.
UnsortedStops
Gradient stop positions are not monotonically increasing.
InvalidGradientPosition
A gradient stop position is outside the normalized [0, 1] range.
MixedGradientStopKinds
A gradient mixes shorthand and explicit stop syntaxes.
InvalidGradientRef
A gradient stop references a token path that does not exist.
Fields
InvalidColorSpace
A gradient specifies an unrecognized interpolation color space.
Trait Implementations§
Source§impl Debug for PaletteError
impl Debug for PaletteError
Source§impl Display for PaletteError
impl Display for PaletteError
Source§impl Error for PaletteError
impl Error for PaletteError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PaletteError
impl !RefUnwindSafe for PaletteError
impl Send for PaletteError
impl Sync for PaletteError
impl Unpin for PaletteError
impl UnsafeUnpin for PaletteError
impl !UnwindSafe for PaletteError
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
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>
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>
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>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more