#[non_exhaustive]pub struct MemoryError { /* private fields */ }memory only.Expand description
Opaque storage-layer error returned by MemoryBackend operations.
Carries a human-readable description of the underlying failure (serialization round-trip miss, account-not-registered race, etc.). The description is intended for test failure messages and diagnostic logging; it is not a stable wire-format identifier.
§Forward compatibility
This type is #[non_exhaustive] and uses a named-field shape so
future revisions can add structured context (error kind, source
reference, account id, etc.) without a breaking change. Outside-
crate construction goes through MemoryError::new; outside-crate
reads go through MemoryError::description.
Mirrors the canonical jmap-mail-server MemoryError shape.
Implementations§
Source§impl MemoryError
impl MemoryError
Sourcepub fn new(description: impl Into<String>) -> Self
pub fn new(description: impl Into<String>) -> Self
Construct a MemoryError from a human-readable description.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Human-readable description of the underlying failure.
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
1.30.0 · 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()
Auto Trait Implementations§
impl Forget for MemoryError
impl Freeze for MemoryError
impl Move for MemoryError
impl RefUnwindSafe for MemoryError
impl Send for MemoryError
impl Sync for MemoryError
impl Unpin for MemoryError
impl UnsafeUnpin for MemoryError
impl UnwindSafe 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<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.