[−][src]Struct c_ares_resolver::Options
Used to configure the behaviour of the resolver.
Implementations
impl Options
[src]
pub fn new() -> Self
[src]
Returns a fresh Options
, on which no values are set.
pub fn set_flags(&mut self, flags: Flags) -> &mut Self
[src]
Set flags controlling the behaviour of the resolver.
pub fn set_timeout(&mut self, ms: u32) -> &mut Self
[src]
Set the number of milliseconds each name server is given to respond to a query on the first try. (After the first try, the timeout algorithm becomes more complicated, but scales linearly with the value of timeout). The default is 5000ms.
pub fn set_tries(&mut self, tries: u32) -> &mut Self
[src]
Set the number of tries the resolver will try contacting each name server before giving up. The default is four tries.
pub fn set_ndots(&mut self, ndots: u32) -> &mut Self
[src]
Set the number of dots which must be present in a domain name for it to be queried for "as is" prior to querying for it with the default domain extensions appended. The default value is 1 unless set otherwise by resolv.conf or the RES_OPTIONS environment variable.
pub fn set_udp_port(&mut self, udp_port: u16) -> &mut Self
[src]
Set the UDP port to use for queries. The default value is 53, the standard name service port.
pub fn set_tcp_port(&mut self, tcp_port: u16) -> &mut Self
[src]
Set the TCP port to use for queries. The default value is 53, the standard name service port.
pub fn set_domains(&mut self, domains: &[&str]) -> &mut Self
[src]
Set the domains to search, instead of the domains specified in resolv.conf or the domain derived from the kernel hostname variable.
pub fn set_lookups(&mut self, lookups: &str) -> &mut Self
[src]
Set the lookups to perform for host queries. lookups
should be set to a string of the
characters "b" or "f", where "b" indicates a DNS lookup and "f" indicates a lookup in the
hosts file.
pub fn set_resolvconf_path(&mut self, resolvconf_path: &str) -> &mut Self
[src]
The path to use for reading the resolv.conf file. The resolvconf_path
should be set to a
path string, and will be honoured on *nix like systems. The default is /etc/resolv.conf.
pub fn set_sock_send_buffer_size(&mut self, size: u32) -> &mut Self
[src]
Set the socket send buffer size.
pub fn set_sock_receive_buffer_size(&mut self, size: u32) -> &mut Self
[src]
Set the socket receive buffer size.
pub fn set_rotate(&mut self) -> &mut Self
[src]
Configure round robin selection of nameservers.
pub fn set_no_rotate(&mut self) -> &mut Self
[src]
Prevent round robin selection of nameservers.
pub fn set_ednspsz(&mut self, size: u32) -> &mut Self
[src]
Set the EDNS packet size.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl !UnwindSafe for Options
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,