Struct fred::error::RedisError
source · pub struct RedisError { /* private fields */ }
Expand description
An error from Redis.
Implementations§
source§impl RedisError
impl RedisError
sourcepub fn new<T>(kind: RedisErrorKind, details: T) -> RedisError
pub fn new<T>(kind: RedisErrorKind, details: T) -> RedisError
Create a new Redis error with the provided details.
sourcepub fn kind(&self) -> &RedisErrorKind
pub fn kind(&self) -> &RedisErrorKind
Read the type of error without any associated data.
sourcepub fn change_kind(&mut self, kind: RedisErrorKind)
pub fn change_kind(&mut self, kind: RedisErrorKind)
Change the kind of the error.
sourcepub fn new_canceled() -> Self
pub fn new_canceled() -> Self
Create a new empty Canceled error.
sourcepub fn is_cluster(&self) -> bool
pub fn is_cluster(&self) -> bool
Whether the error is a Cluster
error.
sourcepub fn is_canceled(&self) -> bool
pub fn is_canceled(&self) -> bool
Whether the error is a Canceled
error.
sourcepub fn is_replica(&self) -> bool
Available on crate feature replicas
only.
pub fn is_replica(&self) -> bool
replicas
only.Whether the error is a Replica
error.
sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Whether the error is a NotFound
error.
Trait Implementations§
source§impl Clone for RedisError
impl Clone for RedisError
source§impl Debug for RedisError
impl Debug for RedisError
source§impl Display for RedisError
impl Display for RedisError
source§impl Error for RedisError
impl Error for RedisError
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 RedisError
Available on crate feature serde-json
only.
impl From<Error> for RedisError
Available on crate feature
serde-json
only.source§impl PartialEq for RedisError
impl PartialEq for RedisError
impl Eq for RedisError
Auto Trait Implementations§
impl Freeze for RedisError
impl RefUnwindSafe for RedisError
impl Send for RedisError
impl Sync for RedisError
impl Unpin for RedisError
impl UnwindSafe for RedisError
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