pub enum SnapError {
Show 18 variants
Store(StoreError),
Protocol(PeerConnectionError),
Trie(TrieError),
RlpDecode(RLPDecodeError),
PeerTable(ActorError),
BadRequest(String),
ValidationError(String),
PeerSelection(String),
NoTasks,
NoAccountHashes,
NoAccountStorages,
NoStorageRoots,
InternalError(String),
FileSystem {
operation: &'static str,
path: PathBuf,
kind: ErrorKind,
},
SnapshotDir(String),
TaskPanic(String),
InvalidData,
InvalidHash,
}Expand description
Unified error type for snap sync protocol operations
Variants§
Store(StoreError)
Storage layer errors
Protocol(PeerConnectionError)
Protocol/connection errors
Trie(TrieError)
Trie operation errors
RlpDecode(RLPDecodeError)
RLP decoding errors
PeerTable(ActorError)
Peer table errors
BadRequest(String)
Bad request from peer (invalid or malformed request)
ValidationError(String)
Response validation failed (invalid proof, hash mismatch, etc.)
PeerSelection(String)
Peer selection failed (no suitable peers available)
NoTasks
Task queue is empty when it shouldn’t be
NoAccountHashes
Missing account data
NoAccountStorages
Missing storage data
NoStorageRoots
Missing storage roots
InternalError(String)
Unexpected internal error (indicates a bug)
FileSystem
File system operation failed
SnapshotDir(String)
Snapshot directory operations
TaskPanic(String)
Task was spawned but panicked
InvalidData
Invalid data received from peer
InvalidHash
Hash mismatch in received data
Implementations§
Source§impl SnapError
impl SnapError
Sourcepub fn dir_not_exists(path: PathBuf) -> Self
pub fn dir_not_exists(path: PathBuf) -> Self
Creates a file system error for directory not existing
Sourcepub fn dir_create_failed(path: PathBuf) -> Self
pub fn dir_create_failed(path: PathBuf) -> Self
Creates a file system error for directory creation failure
Sourcepub fn write_failed(path: PathBuf, kind: ErrorKind) -> Self
pub fn write_failed(path: PathBuf, kind: ErrorKind) -> Self
Creates a file system error for write failure
Trait Implementations§
Source§impl Error for SnapError
impl Error for SnapError
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<ActorError> for SnapError
impl From<ActorError> for SnapError
Source§fn from(source: ActorError) -> Self
fn from(source: ActorError) -> Self
Source§impl From<PeerConnectionError> for SnapError
impl From<PeerConnectionError> for SnapError
Source§fn from(source: PeerConnectionError) -> Self
fn from(source: PeerConnectionError) -> Self
Source§impl From<RLPDecodeError> for SnapError
impl From<RLPDecodeError> for SnapError
Source§fn from(source: RLPDecodeError) -> Self
fn from(source: RLPDecodeError) -> Self
Source§impl From<SnapError> for PeerHandlerError
impl From<SnapError> for PeerHandlerError
Source§impl From<SnapError> for PeerConnectionError
impl From<SnapError> for PeerConnectionError
Source§impl From<StoreError> for SnapError
impl From<StoreError> for SnapError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for SnapError
impl !UnwindSafe for SnapError
impl Freeze for SnapError
impl Send for SnapError
impl Sync for SnapError
impl Unpin for SnapError
impl UnsafeUnpin for SnapError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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> 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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.