pub enum CrawlError {
InvalidUrl(ParseError),
RequestFailed(Error),
TooManyRedirects(usize),
BlockedByRobotsTxt(String),
OutOfScope(String),
Storage(String),
MaxRetriesExceeded(usize),
}Expand description
Errors that can occur during crawl operations.
This is the primary error type for the crawlkit crate. It wraps lower-level errors from URL parsing, HTTP requests, robots.txt, and storage operations.
§Examples
use crawlkit_engine::CrawlError;
let err = CrawlError::TooManyRedirects(20);
assert!(err.to_string().contains("20"));Variants§
InvalidUrl(ParseError)
The URL could not be parsed.
RequestFailed(Error)
The HTTP request failed.
TooManyRedirects(usize)
The URL exceeded the maximum redirect limit.
BlockedByRobotsTxt(String)
The URL is excluded by robots.txt disallow rules.
OutOfScope(String)
The URL is outside the allowed domain scope.
Storage(String)
A storage/database error occurred.
MaxRetriesExceeded(usize)
All retry attempts were exhausted.
Trait Implementations§
Source§impl Debug for CrawlError
impl Debug for CrawlError
Source§impl Display for CrawlError
impl Display for CrawlError
Source§impl Error for CrawlError
impl Error for CrawlError
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<CompareError> for CrawlError
impl From<CompareError> for CrawlError
Source§fn from(e: CompareError) -> Self
fn from(e: CompareError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for CrawlError
impl From<Error> for CrawlError
Source§impl From<ExportError> for CrawlError
impl From<ExportError> for CrawlError
Source§fn from(e: ExportError) -> Self
fn from(e: ExportError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for CrawlError
impl From<ParseError> for CrawlError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for CrawlError
impl From<StorageError> for CrawlError
Source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CrawlError
impl !UnwindSafe for CrawlError
impl Freeze for CrawlError
impl Send for CrawlError
impl Sync for CrawlError
impl Unpin for CrawlError
impl UnsafeUnpin for CrawlError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more