Struct NameServerConfig
#[non_exhaustive]pub struct NameServerConfig {
pub ip: IpAddr,
pub trust_negative_responses: bool,
pub connections: Vec<ConnectionConfig>,
}Expand description
Configuration for the NameServer
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ip: IpAddrThe address which the DNS NameServer is registered at.
trust_negative_responses: boolWhether to trust NXDOMAIN responses from upstream nameservers.
When this is true, and an empty NXDOMAIN response with an empty answers set is
received, the query will not be retried against other configured name servers.
(On a response with any other error response code, the query will still be retried regardless of this configuration setting.)
Defaults to true.
connections: Vec<ConnectionConfig>Connection protocols configured for this server.
Implementations§
§impl NameServerConfig
impl NameServerConfig
pub fn udp_and_tcp(ip: IpAddr) -> NameServerConfig
pub fn udp_and_tcp(ip: IpAddr) -> NameServerConfig
Constructs a nameserver configuration with a UDP and TCP connections
pub fn udp(ip: IpAddr) -> NameServerConfig
pub fn udp(ip: IpAddr) -> NameServerConfig
Constructs a nameserver configuration with a single UDP connection
pub fn tcp(ip: IpAddr) -> NameServerConfig
pub fn tcp(ip: IpAddr) -> NameServerConfig
Constructs a nameserver configuration with a single TCP connection
pub fn new(
ip: IpAddr,
trust_negative_responses: bool,
connections: Vec<ConnectionConfig>,
) -> NameServerConfig
pub fn new( ip: IpAddr, trust_negative_responses: bool, connections: Vec<ConnectionConfig>, ) -> NameServerConfig
Create a new NameServerConfig from its constituent parts.
Trait Implementations§
§impl Clone for NameServerConfig
impl Clone for NameServerConfig
§fn clone(&self) -> NameServerConfig
fn clone(&self) -> NameServerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for NameServerConfig
impl Debug for NameServerConfig
§impl<'de> Deserialize<'de> for NameServerConfig
impl<'de> Deserialize<'de> for NameServerConfig
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NameServerConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NameServerConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for NameServerConfig
impl Serialize for NameServerConfig
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for NameServerConfig
impl RefUnwindSafe for NameServerConfig
impl Send for NameServerConfig
impl Sync for NameServerConfig
impl Unpin for NameServerConfig
impl UnsafeUnpin for NameServerConfig
impl UnwindSafe for NameServerConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more