pub struct Dht { /* private fields */ }Implementations§
Source§impl Dht
impl Dht
pub async fn new( bind_addr: SocketAddr, peer_provider: impl PeerProvider + 'static, ) -> Result<Self>
pub fn find_peers(&self, info_hash: &[u8]) -> Receiver<Vec<SocketAddr>>
pub async fn save(&self, path: &Path) -> Result<()>
pub async fn start(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dht
impl !RefUnwindSafe for Dht
impl !Send for Dht
impl !Sync for Dht
impl Unpin for Dht
impl !UnwindSafe for Dht
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