Enum http_cache::CacheError
source · pub enum CacheError {
Show 14 variants
General(Error),
Http(Error),
InvalidStatusCode(InvalidStatusCode),
HeaderToStr(ToStrError),
InvalidMethod(InvalidMethod),
InvalidUri(InvalidUri),
InvalidUrl(ParseError),
InvalidHeaderValue(InvalidHeaderValue),
InvalidHeaderName(InvalidHeaderName),
CaCache(Error),
Bincode(Box<ErrorKind>),
BadVersion,
BadHeader,
BadRequest,
}Expand description
A generic “error” for HTTP caches
Variants§
General(Error)
A general error used as a catch all for other errors via anyhow
Http(Error)
Error from http
InvalidStatusCode(InvalidStatusCode)
There was an error parsing the HTTP status code
HeaderToStr(ToStrError)
There was an error converting the header to a string
InvalidMethod(InvalidMethod)
There was an error parsing the HTTP method
InvalidUri(InvalidUri)
There was an error parsing the URI
InvalidUrl(ParseError)
There was an error parsing the URL
InvalidHeaderValue(InvalidHeaderValue)
There was an error parsing an HTTP header value
InvalidHeaderName(InvalidHeaderName)
There was an error parsing an HTTP header name
CaCache(Error)
Error from cacache
Bincode(Box<ErrorKind>)
Error from bincode
BadVersion
There was an error parsing the HTTP request version
BadHeader
There was an error parsing an HTTP header value
BadRequest
There was an error parsing the HTTP request
Trait Implementations§
source§impl Debug for CacheError
impl Debug for CacheError
source§impl Diagnostic for CacheError
impl Diagnostic for CacheError
source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Unique diagnostic code that can be used to look up more information
about this
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
Diagnostic severity. This may be used by
ReportHandlers to change the display format
of this diagnostic. Read moresource§fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a, Global>>
fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a, Global>>
Additional help text related to this
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?source§fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a, Global>>
fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a, Global>>
URL to visit for a more detailed explanation/help about this
Diagnostic.source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Source code to apply this
Diagnostic’s Diagnostic::labels to.source§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan>, Global>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan>, Global>>
Labels to apply to this
Diagnostic’s Diagnostic::source_codeAdditional related
Diagnostics.source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
The cause of the error.
source§impl Display for CacheError
impl Display for CacheError
source§impl Error for CacheError
impl Error for CacheError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 CacheError
impl From<Error> for CacheError
source§impl From<Error> for CacheError
impl From<Error> for CacheError
source§impl From<Error> for CacheError
impl From<Error> for CacheError
source§impl From<InvalidHeaderName> for CacheError
impl From<InvalidHeaderName> for CacheError
source§fn from(source: InvalidHeaderName) -> Self
fn from(source: InvalidHeaderName) -> Self
Converts to this type from the input type.
source§impl From<InvalidHeaderValue> for CacheError
impl From<InvalidHeaderValue> for CacheError
source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
source§impl From<InvalidMethod> for CacheError
impl From<InvalidMethod> for CacheError
source§fn from(source: InvalidMethod) -> Self
fn from(source: InvalidMethod) -> Self
Converts to this type from the input type.
source§impl From<InvalidStatusCode> for CacheError
impl From<InvalidStatusCode> for CacheError
source§fn from(source: InvalidStatusCode) -> Self
fn from(source: InvalidStatusCode) -> Self
Converts to this type from the input type.
source§impl From<InvalidUri> for CacheError
impl From<InvalidUri> for CacheError
source§fn from(source: InvalidUri) -> Self
fn from(source: InvalidUri) -> Self
Converts to this type from the input type.
source§impl From<ParseError> for CacheError
impl From<ParseError> for CacheError
source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
source§impl From<ToStrError> for CacheError
impl From<ToStrError> for CacheError
source§fn from(source: ToStrError) -> Self
fn from(source: ToStrError) -> Self
Converts to this type from the input type.