pub enum BlockPalettesError {
Http(Error),
Api(String),
HtmlParse,
InvalidDateFormat,
}Expand description
Represents the possible errors that can occur when interacting with the Block Palettes API.
Variants§
Http(Error)
An HTTP request failed, typically due to network issues, DNS resolution, or invalid URLs.
This error wraps the underlying reqwest::Error.
Api(String)
The Block Palettes API returned an error message or indicated a failure in its response.
The contained String provides more details about the API-specific error.
HtmlParse
An error occurred during the parsing of HTML content, typically when scraping a palette page.
This can happen if the HTML structure changes unexpectedly.
InvalidDateFormat
The date string received from the API could not be parsed into a
NaiveDateTime object.
This usually indicates an unexpected date format from the API.
Trait Implementations§
Source§impl Debug for BlockPalettesError
impl Debug for BlockPalettesError
Source§impl Display for BlockPalettesError
impl Display for BlockPalettesError
Source§impl Error for BlockPalettesError
impl Error for BlockPalettesError
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 BlockPalettesError
impl !RefUnwindSafe for BlockPalettesError
impl Send for BlockPalettesError
impl Sync for BlockPalettesError
impl Unpin for BlockPalettesError
impl !UnwindSafe for BlockPalettesError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.