pub enum MemoryError {
Show 15 variants
EmptyContent,
ContentTooLarge {
maximum_bytes: usize,
},
QueryTooLarge {
maximum_bytes: usize,
},
RecordCapacity {
maximum: usize,
},
ContentCapacity {
maximum_bytes: usize,
},
StorageCapacity,
SecretRejected,
Duplicate,
NotFound,
Conflict,
RemoteReadOnly,
InvalidPagination,
UnsupportedSchemaVersion {
found: i64,
supported: i64,
},
Backend {
source: Box<dyn Error + Send + Sync>,
},
Unavailable {
source: Box<dyn Error + Send + Sync>,
},
}Expand description
Failure from local storage, remote transport, validation, or optimistic concurrency.
Variants§
EmptyContent
Content is empty after trimming.
ContentTooLarge
One record exceeds its byte bound.
QueryTooLarge
A scan query exceeds its byte bound.
RecordCapacity
The record-count bound is exhausted.
ContentCapacity
The aggregate content-byte bound is exhausted.
StorageCapacity
The backing store reached its configured storage bound.
SecretRejected
Content was rejected as a likely credential or secret.
Duplicate
Equivalent normalized content already exists.
NotFound
The requested record does not exist.
Conflict
A key version or snapshot state is stale.
RemoteReadOnly
A mutation targeted a namespace not owned by this backend.
InvalidPagination
A store returned an invalid or unbounded pagination sequence.
UnsupportedSchemaVersion
Database schema is newer than this implementation supports.
Fields
Backend
A backend-specific operation failed.
A backend-specific operation failed transiently and may be retried.
Implementations§
Source§impl MemoryError
impl MemoryError
Sourcepub fn backend(source: impl Error + Send + Sync + 'static) -> Self
pub fn backend(source: impl Error + Send + Sync + 'static) -> Self
Wraps a permanent or unclassified backend-specific failure.
Wraps a transient backend-specific failure that may succeed when retried.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns whether the backend classified this failure as transient.
Trait Implementations§
Source§impl Debug for MemoryError
impl Debug for MemoryError
Source§impl Display for MemoryError
impl Display for MemoryError
Source§impl Error for MemoryError
impl Error for MemoryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<RemoteClientError> for MemoryError
Available on crate feature client only.
impl From<RemoteClientError> for MemoryError
client only.Source§fn from(source: RemoteClientError) -> Self
fn from(source: RemoteClientError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryError
impl !UnwindSafe for MemoryError
impl Freeze for MemoryError
impl Send for MemoryError
impl Sync for MemoryError
impl Unpin for MemoryError
impl UnsafeUnpin for MemoryError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.