Struct librqbit_dht::DhtState
source · pub struct DhtState { /* private fields */ }
Implementations§
source§impl DhtState
impl DhtState
pub async fn new() -> Result<Arc<Self>>
pub fn cancellation_token(&self) -> &CancellationToken
pub fn with_config(config: DhtConfig) -> BoxFuture<'static, Result<Arc<Self>>>
pub fn get_peers( self: &Arc<Self>, info_hash: Id20, announce_port: Option<u16> ) -> Result<RequestPeersStream>
pub fn listen_addr(&self) -> SocketAddr
pub fn stats(&self) -> DhtStats
pub fn with_routing_table<R, F: FnOnce(&RoutingTable) -> R>(&self, f: F) -> R
pub fn clone_routing_table(&self) -> RoutingTable
Auto Trait Implementations§
impl !Freeze for DhtState
impl !RefUnwindSafe for DhtState
impl Send for DhtState
impl Sync for DhtState
impl Unpin for DhtState
impl !UnwindSafe for DhtState
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