pub enum P2PError {
Codec(String),
Network(String),
Storage(StorageError),
InvalidMessage(String),
RepoNotFound(String),
ChannelClosed,
}Expand description
Errors that can occur in P2P operations.
Variants§
Codec(String)
Message encoding/decoding error.
Network(String)
Network error.
Storage(StorageError)
Storage error.
InvalidMessage(String)
Invalid message.
RepoNotFound(String)
Repository not found.
ChannelClosed
Channel closed.
Trait Implementations§
Source§impl Error for P2PError
impl Error for P2PError
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<StorageError> for P2PError
impl From<StorageError> for P2PError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for P2PError
impl !UnwindSafe for P2PError
impl Freeze for P2PError
impl Send for P2PError
impl Sync for P2PError
impl Unpin for P2PError
impl UnsafeUnpin for P2PError
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