pub struct EndpointConfig { /* private fields */ }Expand description
Configuration for an Endpoint.
Implementations§
Source§impl EndpointConfig
impl EndpointConfig
Sourcepub const fn new() -> EndpointConfig
pub const fn new() -> EndpointConfig
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) -> EndpointConfig
pub const fn with_probe_unique_names(self, v: bool) -> EndpointConfig
Set whether to probe before claiming a service name.
Sourcepub const fn with_answer_questions(self, v: bool) -> EndpointConfig
pub const fn with_answer_questions(self, v: bool) -> EndpointConfig
Set whether to answer incoming questions for registered services.
Sourcepub const fn with_populate_cache(self, v: bool) -> EndpointConfig
pub const fn with_populate_cache(self, v: bool) -> EndpointConfig
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) -> EndpointConfig
pub const fn with_trust_advertised_src_as_self(self, v: bool) -> EndpointConfig
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
Source§fn default() -> EndpointConfig
fn default() -> 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 ==.impl StructuralPartialEq for EndpointConfig
Auto Trait Implementations§
impl Freeze for EndpointConfig
impl RefUnwindSafe for EndpointConfig
impl Send for EndpointConfig
impl Sync for EndpointConfig
impl Unpin for EndpointConfig
impl UnsafeUnpin for EndpointConfig
impl UnwindSafe for EndpointConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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