pub enum AdvisoryError {
Show 13 variants
Redis(RedisError),
SourceFetch {
source_name: String,
message: String,
},
Config(String),
Serialization(Error),
Compression(String),
Http(Error),
HttpMiddleware(Error),
RateLimit {
source_name: String,
message: String,
},
Io(Error),
VersionParse {
version: String,
message: String,
},
Zip(ZipError),
TaskJoin(JoinError),
GraphQL(String),
}Expand description
The main error type for all operations in this crate.
Variants§
Redis(RedisError)
Redis/DragonflyDB connection or operation failed.
SourceFetch
Failed to fetch data from an advisory source.
Fields
Config(String)
Configuration error (missing or invalid values).
Serialization(Error)
JSON serialization/deserialization failed.
Compression(String)
Compression or decompression failed.
Http(Error)
HTTP request failed.
HttpMiddleware(Error)
HTTP request via middleware failed.
RateLimit
Rate limit exceeded.
Fields
Io(Error)
I/O error (file operations, etc.).
VersionParse
Version parsing failed.
Zip(ZipError)
ZIP archive error.
TaskJoin(JoinError)
Task join error (from spawned tasks).
GraphQL(String)
GraphQL API error.
Implementations§
Source§impl AdvisoryError
impl AdvisoryError
Sourcepub fn source_fetch(
source: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn source_fetch( source: impl Into<String>, message: impl Into<String>, ) -> Self
Create a new source fetch error.
Sourcepub fn compression(message: impl Into<String>) -> Self
pub fn compression(message: impl Into<String>) -> Self
Create a new compression error.
Sourcepub fn rate_limit(source: impl Into<String>, message: impl Into<String>) -> Self
pub fn rate_limit(source: impl Into<String>, message: impl Into<String>) -> Self
Create a new rate limit error.
Sourcepub fn version_parse(
version: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn version_parse( version: impl Into<String>, message: impl Into<String>, ) -> Self
Create a new version parse error.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable.
Trait Implementations§
Source§impl Debug for AdvisoryError
impl Debug for AdvisoryError
Source§impl Display for AdvisoryError
impl Display for AdvisoryError
Source§impl Error for AdvisoryError
impl Error for AdvisoryError
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 AdvisoryError
impl From<Error> for AdvisoryError
Source§impl From<Error> for AdvisoryError
impl From<Error> for AdvisoryError
Source§impl From<Error> for AdvisoryError
impl From<Error> for AdvisoryError
Source§impl From<Error> for AdvisoryError
impl From<Error> for AdvisoryError
Source§impl From<JoinError> for AdvisoryError
impl From<JoinError> for AdvisoryError
Source§impl From<RedisError> for AdvisoryError
impl From<RedisError> for AdvisoryError
Source§fn from(source: RedisError) -> Self
fn from(source: RedisError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AdvisoryError
impl !RefUnwindSafe for AdvisoryError
impl Send for AdvisoryError
impl Sync for AdvisoryError
impl Unpin for AdvisoryError
impl !UnwindSafe for AdvisoryError
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.