pub enum FetchiumError {
Show 21 variants
Network(Error),
Io(Error),
Json(Error),
Config(String),
Cache(String),
Extraction(String),
Search(String),
Validation(String),
BudgetExceeded {
used: u32,
budget: u32,
},
Database(Error),
UrlParse(ParseError),
Structured(StructuredError),
AiUnavailable(String),
Internal(String),
NotFound(String),
ExternalTool(String),
InsecureConnection {
url: String,
suggestion: String,
},
InvalidUrl(String),
YouTube(String),
OperationTimeout {
operation: String,
timeout_ms: u64,
suggestion: String,
},
Other(Error),
}Expand description
Main error type for fetchium-core.
Variants§
Network(Error)
Io(Error)
Json(Error)
Config(String)
Cache(String)
Extraction(String)
Search(String)
Validation(String)
BudgetExceeded
Database(Error)
UrlParse(ParseError)
Structured(StructuredError)
Internal(String)
NotFound(String)
ExternalTool(String)
InsecureConnection
InvalidUrl(String)
YouTube(String)
OperationTimeout
Other(Error)
Implementations§
Source§impl FetchiumError
impl FetchiumError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether this error is retryable.
Sourcepub fn suggested_action(&self) -> &str
pub fn suggested_action(&self) -> &str
A human-readable suggestion for how to resolve this error.
Sourcepub fn to_structured(&self) -> StructuredError
pub fn to_structured(&self) -> StructuredError
Convert to a structured error for serialized output.
Trait Implementations§
Source§impl Debug for FetchiumError
impl Debug for FetchiumError
Source§impl Display for FetchiumError
impl Display for FetchiumError
Source§impl Error for FetchiumError
impl Error for FetchiumError
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<Error> for FetchiumError
impl From<Error> for FetchiumError
Source§impl From<Error> for FetchiumError
impl From<Error> for FetchiumError
Source§impl From<Error> for FetchiumError
impl From<Error> for FetchiumError
Source§impl From<Error> for FetchiumError
impl From<Error> for FetchiumError
Source§impl From<Error> for FetchiumError
impl From<Error> for FetchiumError
Source§impl From<ParseError> for FetchiumError
impl From<ParseError> for FetchiumError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FetchiumError
impl !UnwindSafe for FetchiumError
impl Freeze for FetchiumError
impl Send for FetchiumError
impl Sync for FetchiumError
impl Unpin for FetchiumError
impl UnsafeUnpin for FetchiumError
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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> 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> Pointable for T
impl<T> Pointable for T
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.