pub enum VlrError {
Http {
url: String,
source: Error,
},
UnexpectedStatus {
url: String,
status: StatusCode,
},
ResponseBody {
url: String,
source: Error,
},
Selector(String),
IntParse(ParseIntError),
DateParse(ParseError),
ElementNotFound {
context: &'static str,
},
}Expand description
All errors that can occur during VLR scraping operations.
Variants§
Http
HTTP request failed (network, DNS, TLS, timeout, etc.).
UnexpectedStatus
Server returned a non-success HTTP status code.
ResponseBody
Failed to read the response body as text.
Selector(String)
A CSS selector string could not be parsed.
IntParse(ParseIntError)
Failed to parse an integer from scraped text.
DateParse(ParseError)
Failed to parse a date/time from scraped text.
ElementNotFound
An expected HTML element was not found on the page.
Trait Implementations§
Source§impl Error for VlrError
impl Error for VlrError
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<ParseError> for VlrError
impl From<ParseError> for VlrError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for VlrError
impl From<ParseIntError> for VlrError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VlrError
impl !RefUnwindSafe for VlrError
impl Send for VlrError
impl Sync for VlrError
impl Unpin for VlrError
impl !UnwindSafe for VlrError
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.