pub enum ClientStreamingError {
Client {
client: String,
error: BoxError,
},
HttpCache(StreamingError),
Other(BoxError),
}Expand description
Streaming error type specifically for client-specific streaming operations
This type provides a more granular error classification for streaming operations while being compatible with the unified HttpCacheError system.
§Examples
use http_cache::{ClientStreamingError, HttpCacheError};
// Create a streaming error with specific client context
let streaming_err = ClientStreamingError::client("reqwest", "Network timeout during streaming");
let cache_err: HttpCacheError = streaming_err.into();Variants§
Client
Client-specific streaming error with context
Fields
HttpCache(StreamingError)
HTTP cache streaming error (delegated to StreamingError)
Other(BoxError)
Other streaming error
Implementations§
Source§impl ClientStreamingError
impl ClientStreamingError
Sourcepub fn client<C, E>(client: C, error: E) -> Self
pub fn client<C, E>(client: C, error: E) -> Self
Create a client-specific streaming error
§Examples
use http_cache::ClientStreamingError;
let err = ClientStreamingError::client("reqwest", "Connection timeout");Sourcepub fn http_cache(error: StreamingError) -> Self
pub fn http_cache(error: StreamingError) -> Self
Create an HTTP cache streaming error
§Examples
use http_cache::{ClientStreamingError, StreamingError};
let streaming_err = StreamingError::io("File read failed");
let err = ClientStreamingError::http_cache(streaming_err);Trait Implementations§
Source§impl Debug for ClientStreamingError
impl Debug for ClientStreamingError
Source§impl Display for ClientStreamingError
impl Display for ClientStreamingError
Source§impl Error for ClientStreamingError
impl Error for ClientStreamingError
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<ClientStreamingError> for HttpCacheError
impl From<ClientStreamingError> for HttpCacheError
Source§fn from(error: ClientStreamingError) -> Self
fn from(error: ClientStreamingError) -> Self
Converts to this type from the input type.
Source§impl From<ClientStreamingError> for StreamingError
impl From<ClientStreamingError> for StreamingError
Source§fn from(error: ClientStreamingError) -> Self
fn from(error: ClientStreamingError) -> Self
Converts to this type from the input type.
Source§impl From<StreamingError> for ClientStreamingError
impl From<StreamingError> for ClientStreamingError
Source§fn from(error: StreamingError) -> Self
fn from(error: StreamingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ClientStreamingError
impl !RefUnwindSafe for ClientStreamingError
impl Send for ClientStreamingError
impl Sync for ClientStreamingError
impl Unpin for ClientStreamingError
impl !UnwindSafe for ClientStreamingError
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> 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