#[non_exhaustive]pub enum RestoreError {
AlreadyRestored,
Conflict(Vec<ChannelId>),
Invariant(&'static str),
}Expand description
Restore-specific failure modes surfaced via crate::Error::Restore.
Every variant is reported before any store mutation — a
precondition error is exactly equivalent to never having called
restore. Store I/O failures mid-restore propagate as their
underlying crate::Error variant instead.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AlreadyRestored
A user-secret snapshot already exists for the protocol’s
secret_id. The application must clear it before retrying.
Conflict(Vec<ChannelId>)
One or more channels already live at canonical helper or
replica ids carried by the recovered Secret. The contained
list enumerates the collisions; the application clears them
through its own store wrappers and retries.
Invariant(&'static str)
The recovered Secret is internally inconsistent. Only
reachable when a Secret was hand-crafted — library-produced
ones always satisfy the invariants (rebuilt inside the sharing
handler during a start(ProtectSecret) round).
Trait Implementations§
Source§impl Debug for RestoreError
impl Debug for RestoreError
Source§impl Display for RestoreError
impl Display for RestoreError
Source§impl Error for RestoreError
impl Error for RestoreError
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()
Source§impl From<RestoreError> for Error
impl From<RestoreError> for Error
Source§fn from(source: RestoreError) -> Self
fn from(source: RestoreError) -> Self
Auto Trait Implementations§
impl Freeze for RestoreError
impl RefUnwindSafe for RestoreError
impl Send for RestoreError
impl Sync for RestoreError
impl Unpin for RestoreError
impl UnsafeUnpin for RestoreError
impl UnwindSafe for RestoreError
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> 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>
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>
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