pub struct QueryParam { /* private fields */ }Expand description
Parameters for a DNS-SD browse / lookup.
Implementations§
Source§impl QueryParam
impl QueryParam
Sourcepub const fn new(service: Name) -> Self
pub const fn new(service: Name) -> Self
Browse the given fully-qualified service type, e.g.
Name::try_from_str("_ipp._tcp.local.").
Sourcepub const fn with_timeout(self, timeout: Duration) -> Self
pub const fn with_timeout(self, timeout: Duration) -> Self
How long the browse (the PTR query) runs before terminating.
Sourcepub const fn with_resolve_timeout(self, timeout: Duration) -> Self
pub const fn with_resolve_timeout(self, timeout: Duration) -> Self
How long each per-instance resolve query (SRV / TXT / A / AAAA) runs. Defaults to the browse timeout when unset.
Sourcepub const fn with_unicast_response(self, unicast: bool) -> Self
pub const fn with_unicast_response(self, unicast: bool) -> Self
Request unicast responses on the issued queries (RFC 6762 §5.4). Defaults
to false (standard multicast browse).
Sourcepub const fn with_max_entries(self, max: usize) -> Self
pub const fn with_max_entries(self, max: usize) -> Self
Cap on the number of distinct instances tracked; instances discovered
beyond it are dropped. Defaults to DEFAULT_MAX_ENTRIES. A value of
0 is treated as 1.
Trait Implementations§
Source§impl Clone for QueryParam
impl Clone for QueryParam
Source§fn clone(&self) -> QueryParam
fn clone(&self) -> QueryParam
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for QueryParam
impl RefUnwindSafe for QueryParam
impl Send for QueryParam
impl Sync for QueryParam
impl Unpin for QueryParam
impl UnsafeUnpin for QueryParam
impl UnwindSafe for QueryParam
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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