pub struct Builder { /* private fields */ }
Implementations§
source§impl Builder
impl Builder
sourcepub fn server(self) -> Self
pub fn server(self) -> Self
Create a full DHT node that accepts requests, and acts as a routing and storage node.
pub fn custom_server(self, custom_server: Box<dyn Server>) -> Self
sourcepub fn request_timeout(self, request_timeout: Duration) -> Self
pub fn request_timeout(self, request_timeout: Duration) -> Self
Set the the duration a request awaits for a response.
The longer this duration is, the longer queries take until they are deemeed “done”. The shortet this duration is, the more responses from busy nodes we miss out on, which affects the accuracy of queries trying to find closest nodes to a target.
Defaults to 2 seconds.
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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