pub enum MemoryError {
Show 14 variants
Database {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
InvalidInput {
field: String,
reason: String,
},
InvalidDimension {
expected: usize,
actual: usize,
},
NotFound {
entity: String,
id: String,
},
UnsupportedOperation(String),
Reservoir {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Persistence(String),
External(String),
Config(String),
Io(Error),
Serialization(Error),
Observability(String),
ObservabilityFeatureDisabled {
feature: &'static str,
},
ObservabilityAlreadyInitialised,
}Variants§
Database
InvalidInput
InvalidDimension
NotFound
UnsupportedOperation(String)
Reservoir
Persistence(String)
External(String)
Config(String)
Io(Error)
Serialization(Error)
Observability(String)
ObservabilityFeatureDisabled
ObservabilityAlreadyInitialised
Implementations§
Source§impl MemoryError
impl MemoryError
pub fn database(message: impl Into<String>) -> Self
pub fn database_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn reservoir(message: impl Into<String>) -> Self
pub fn reservoir_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn remediation(&self) -> Option<&'static str>
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)>
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 MemoryError
impl From<Error> for MemoryError
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
Mutably borrows from an owned value. Read more