pub enum Error {
Show 14 variants
Generic(String),
Static(&'static str),
IO(Error),
InvalidIdSize(usize),
InvalidIdEncoding(String),
BencodeError(Error),
InvalidTransactionId(Vec<u8>),
Receive(RecvError),
DhtIsShutdown(SendError<ActorMessage>),
InvalidMutableSignature,
InvalidMutablePublicKey,
NoClosestNodes,
QueryError(ErrorSpecific),
PutQueryIsInflight(Id),
}
Expand description
Mainline crate error enum.
Variants§
Generic(String)
For starter, to remove as code matures.
Static(&'static str)
For starter, to remove as code matures.
IO(Error)
Transparent std::io::Error
InvalidIdSize(usize)
Id is expected to by 20 bytes.
InvalidIdEncoding(String)
hex encoding issue
BencodeError(Error)
Errors related to parsing DHT messages.
InvalidTransactionId(Vec<u8>)
Indicates that the message transaction_id is not two bytes.
Receive(RecvError)
Transparent flume::RecvError
DhtIsShutdown(SendError<ActorMessage>)
The dht was shutdown.
InvalidMutableSignature
InvalidMutablePublicKey
NoClosestNodes
Failed to find any nodes close, usually means dht node failed to bootstrap, so the routing table is empty. Check the machine’s access to UDP socket, or find better bootstrapping nodes.
QueryError(ErrorSpecific)
PutQueryIsInflight(Id)
crate::rpc::Rpc::put query is already inflight to the same target
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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