#[non_exhaustive]pub enum ShareStoreError {
AlreadyExists {
channel_id: u64,
version: u32,
},
NotFound {
channel_id: u64,
version: u32,
},
Backend(Box<dyn Error + Send + Sync + 'static>),
}Expand description
Errors produced by DeRecShareStore implementations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AlreadyExists
A share for (channel_id, version) already exists.
Returned by DeRecShareStore::save when the
implementation enforces immutability of versioned share slots. The protocol treats each
(channel_id, version) pair as write-once; overwriting a confirmed share
is a protocol violation.
NotFound
No share was found for (channel_id, version).
Implementations that prefer an explicit error over returning Ok(None)
may return this variant from DeRecShareStore::load.
Backend(Box<dyn Error + Send + Sync + 'static>)
An I/O or serialization error in the underlying storage backend.
The original error is preserved as the source so that callers can
inspect the full error chain via std::error::Error::source.
Trait Implementations§
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§fn from(source: ShareStoreError) -> Self
fn from(source: ShareStoreError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more