pub struct GetPeersResult { /* private fields */ }
Expand description
Represents the results of a get_peers operation
Implementations§
Source§impl GetPeersResult
impl GetPeersResult
pub fn new( info_hash: Id, peers: Vec<SocketAddr>, responders: Vec<GetPeersResponder>, ) -> GetPeersResult
Sourcepub fn info_hash(self) -> Id
pub fn info_hash(self) -> Id
The info_hash of the torrent that get_peers was attempting to get peers for
Sourcepub fn peers(self) -> Vec<SocketAddr>
pub fn peers(self) -> Vec<SocketAddr>
Vector full of any peers that were found for the info_hash
Sourcepub fn responders(self) -> Vec<GetPeersResponder>
pub fn responders(self) -> Vec<GetPeersResponder>
Vector of information about the DHT nodes that responded to get_peers
This is sorted by distance of the Node to the info_hash, from nearest to farthest.
Auto Trait Implementations§
impl Freeze for GetPeersResult
impl RefUnwindSafe for GetPeersResult
impl Send for GetPeersResult
impl Sync for GetPeersResult
impl Unpin for GetPeersResult
impl UnwindSafe for GetPeersResult
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