#[non_exhaustive]pub enum ThemeLoadError {
Io(Error),
Parse(String),
}Available on crate feature
serde only.Expand description
Error returned when loading a theme from a file or string fails.
Carries either the underlying I/O failure or a human-readable parse message. Never panics on malformed input — callers decide how to recover.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(Error)
The theme file could not be read from disk.
Parse(String)
The document was read but is not valid TOML, or did not match the
expected ThemeFile shape. The string carries the parser’s message.
Trait Implementations§
Source§impl Debug for ThemeLoadError
impl Debug for ThemeLoadError
Source§impl Display for ThemeLoadError
impl Display for ThemeLoadError
Source§impl Error for ThemeLoadError
impl Error for ThemeLoadError
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()
Auto Trait Implementations§
impl Freeze for ThemeLoadError
impl !RefUnwindSafe for ThemeLoadError
impl Send for ThemeLoadError
impl Sync for ThemeLoadError
impl Unpin for ThemeLoadError
impl UnsafeUnpin for ThemeLoadError
impl !UnwindSafe for ThemeLoadError
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> 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