pub struct EndpointConfig { /* private fields */ }Expand description
Configuration for an Endpoint.
Implementations§
Source§impl EndpointConfig
impl EndpointConfig
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct with defaults: probe on registration, answer questions, cache
observations, and DO NOT trust advertised-source matching as a self-
loopback signal. The default is appropriate for the supported async
driver, which passes an authoritative self-loopback flag to
Endpoint::handle (its caller_is_self
parameter) for every inbound datagram and so does not need the lossy
fallback. Single-process callers that cannot supply caller_is_self should
enable trust_advertised_src_as_self to recover the legacy
behaviour.
Sourcepub const fn probe_unique_names(&self) -> bool
pub const fn probe_unique_names(&self) -> bool
Whether to probe before claiming a service name.
Sourcepub const fn answer_questions(&self) -> bool
pub const fn answer_questions(&self) -> bool
Whether to answer incoming questions for registered services.
Sourcepub const fn populate_cache(&self) -> bool
pub const fn populate_cache(&self) -> bool
Whether to populate the cache from observed records.
Sourcepub const fn with_probe_unique_names(self, v: bool) -> Self
pub const fn with_probe_unique_names(self, v: bool) -> Self
Set whether to probe before claiming a service name.
Sourcepub const fn with_answer_questions(self, v: bool) -> Self
pub const fn with_answer_questions(self, v: bool) -> Self
Set whether to answer incoming questions for registered services.
Sourcepub const fn with_populate_cache(self, v: bool) -> Self
pub const fn with_populate_cache(self, v: bool) -> Self
Set whether to populate the cache from observed records.
Sourcepub const fn trust_advertised_src_as_self(&self) -> bool
pub const fn trust_advertised_src_as_self(&self) -> bool
Whether to treat any inbound packet whose source IP matches an advertised A/AAAA record as a self-loopback.
Default: false. The driver-side self-send hash cache — surfaced to
the proto via the caller_is_self argument of
Endpoint::handle — supersedes this signal and
avoids the false positives that drop legitimate same-host peer traffic.
Enable only when running a single-process responder that cannot supply
caller_is_self.
Sourcepub const fn with_trust_advertised_src_as_self(self, v: bool) -> Self
pub const fn with_trust_advertised_src_as_self(self, v: bool) -> Self
Trait Implementations§
Source§impl Clone for EndpointConfig
impl Clone for EndpointConfig
Source§fn clone(&self) -> EndpointConfig
fn clone(&self) -> EndpointConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EndpointConfig
Source§impl Debug for EndpointConfig
impl Debug for EndpointConfig
Source§impl Default for EndpointConfig
impl Default for EndpointConfig
impl Eq for EndpointConfig
Source§impl PartialEq for EndpointConfig
impl PartialEq for EndpointConfig
Source§fn eq(&self, other: &EndpointConfig) -> bool
fn eq(&self, other: &EndpointConfig) -> bool
self and other values to be equal, and is used by ==.