pub enum Error {
Show 14 variants
Krpc {
code: i64,
message: String,
},
InvalidMessage(String),
TransactionMismatch {
expected: u16,
got: u16,
},
Timeout,
InvalidCompactNode(String),
RoutingTableFull,
Shutdown,
Bencode(Error),
Io(Error),
Bep44ValueTooLarge {
size: usize,
max: usize,
},
Bep44SaltTooLarge {
size: usize,
max: usize,
},
Bep44InvalidSignature,
Bep44SequenceTooOld {
got: i64,
current: i64,
},
Bep44CasMismatch {
expected: i64,
actual: i64,
},
}Expand description
Errors from DHT operations.
Variants§
Krpc
Remote node returned a KRPC error response.
Fields
InvalidMessage(String)
Received a malformed KRPC message.
TransactionMismatch
Response transaction ID does not match the request.
Timeout
Query timed out with no response.
InvalidCompactNode(String)
Malformed compact node info bytes.
RoutingTableFull
All k-buckets are full and no stale nodes to replace.
Shutdown
DHT actor has been shut down.
Bencode(Error)
Bencode parsing error.
Io(Error)
I/O error.
Bep44ValueTooLarge
BEP 44 value exceeds the 1000-byte limit.
Bep44SaltTooLarge
BEP 44 salt exceeds the 64-byte limit.
Bep44InvalidSignature
BEP 44 ed25519 signature verification failed.
Bep44SequenceTooOld
BEP 44 put rejected because sequence number is not newer.
Bep44CasMismatch
BEP 44 CAS (compare-and-swap) failed because stored seq differs.
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)>
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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