File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 44
55- Update to ` libp2p-swarm ` ` v0.36.0 ` .
66
7+ - Derive ` Error ` for ` GetRecordError ` (see [ PR 2614] ).
8+
9+ [ pr 2614 ] : https://github.com/libp2p/rust-libp2p/pull/2614
10+
711# 0.36.0
812
913- Update to ` libp2p-swarm ` ` v0.35.0 ` .
Original file line number Diff line number Diff line change @@ -2555,17 +2555,20 @@ pub struct GetRecordOk {
25552555}
25562556
25572557/// The error result of [`Kademlia::get_record`].
2558- #[ derive( Debug , Clone ) ]
2558+ #[ derive( Debug , Clone , Error ) ]
25592559pub enum GetRecordError {
2560+ #[ error( "the record was not found" ) ]
25602561 NotFound {
25612562 key : record:: Key ,
25622563 closest_peers : Vec < PeerId > ,
25632564 } ,
2565+ #[ error( "the quorum failed; needed {quorum} peers" ) ]
25642566 QuorumFailed {
25652567 key : record:: Key ,
25662568 records : Vec < PeerRecord > ,
25672569 quorum : NonZeroUsize ,
25682570 } ,
2571+ #[ error( "the request timed out" ) ]
25692572 Timeout {
25702573 key : record:: Key ,
25712574 records : Vec < PeerRecord > ,
You can’t perform that action at this time.
0 commit comments