pub struct GaiResolver { /* private fields */ }
Expand description
A resolver using blocking getaddrinfo
calls in a threadpool.
Implementations
sourceimpl GaiResolver
impl GaiResolver
sourcepub fn new(threads: usize) -> Self
pub fn new(threads: usize) -> Self
Construct a new GaiResolver
.
Takes number of DNS worker threads.
sourcepub fn new_with_executor<E: 'static>(executor: E) -> Self where
E: Executor<GaiTask> + Send + Sync,
pub fn new_with_executor<E: 'static>(executor: E) -> Self where
E: Executor<GaiTask> + Send + Sync,
Construct a new GaiResolver
with a shared thread pool executor.
Takes an executor to run blocking getaddrinfo
tasks on.
Trait Implementations
sourceimpl Clone for GaiResolver
impl Clone for GaiResolver
sourcefn clone(&self) -> GaiResolver
fn clone(&self) -> GaiResolver
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GaiResolver
impl Debug for GaiResolver
Auto Trait Implementations
impl !RefUnwindSafe for GaiResolver
impl Send for GaiResolver
impl Sync for GaiResolver
impl Unpin for GaiResolver
impl !UnwindSafe for GaiResolver
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more