pub enum StoreError {
InvalidKey(String),
ValueTooLarge,
StoreFull,
SerializationError(String),
InvalidSnapshot,
IoError(String),
NetworkError(String),
ConsensusError(String),
Timeout,
ShuttingDown,
Internal(String),
}Expand description
Errors that can occur during KVStore operations
Variants§
InvalidKey(String)
Invalid key provided
ValueTooLarge
Value is too large to store
StoreFull
Store has reached maximum capacity
SerializationError(String)
Serialization error
InvalidSnapshot
Invalid snapshot
IoError(String)
IO error
NetworkError(String)
Network error
ConsensusError(String)
Consensus error
Timeout
Timeout error
ShuttingDown
Store is shutting down
Internal(String)
Internal error
Implementations§
Source§impl StoreError
impl StoreError
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable
Sourcepub fn is_client_error(&self) -> bool
pub fn is_client_error(&self) -> bool
Check if this error indicates a client error (4xx equivalent)
Sourcepub fn is_server_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Check if this error indicates a server error (5xx equivalent)
Trait Implementations§
Source§impl Clone for StoreError
impl Clone for StoreError
Source§fn clone(&self) -> StoreError
fn clone(&self) -> StoreError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
1.30.0 · 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<StoreError> for KVResult
impl From<StoreError> for KVResult
Source§fn from(error: StoreError) -> Self
fn from(error: StoreError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StoreError
impl PartialEq for StoreError
Source§fn eq(&self, other: &StoreError) -> bool
fn eq(&self, other: &StoreError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StoreError
Auto Trait Implementations§
impl Freeze for StoreError
impl RefUnwindSafe for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
impl UnwindSafe for StoreError
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