pub struct LanDiscoveryConfig {
pub enabled: bool,
pub service_type: String,
pub scope: Option<String>,
}Expand description
Runtime configuration for the mDNS responder + browser.
Fields§
§enabled: boolMaster switch. Default: true — we already publish identity on
Nostr relays; the marginal leak from also multicasting on the LAN
is zero, while the latency win is large for same-LAN peers.
service_type: StringOverridable service type, primarily so integration tests can run multiple isolated services on the same loopback interface.
scope: Option<String>Optional application/network scope carried in the LAN-only TXT record. Browsers that set a scope ignore adverts for other scopes.
This is intentionally separate from Nostr discovery’s public app
tag so applications can keep relay-visible adverts generic while
still isolating LAN discovery per private network.
Trait Implementations§
Source§impl Clone for LanDiscoveryConfig
impl Clone for LanDiscoveryConfig
Source§fn clone(&self) -> LanDiscoveryConfig
fn clone(&self) -> LanDiscoveryConfig
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 moreSource§impl Debug for LanDiscoveryConfig
impl Debug for LanDiscoveryConfig
Source§impl Default for LanDiscoveryConfig
impl Default for LanDiscoveryConfig
Source§impl<'de> Deserialize<'de> for LanDiscoveryConfig
impl<'de> Deserialize<'de> for LanDiscoveryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LanDiscoveryConfig
impl RefUnwindSafe for LanDiscoveryConfig
impl Send for LanDiscoveryConfig
impl Sync for LanDiscoveryConfig
impl Unpin for LanDiscoveryConfig
impl UnsafeUnpin for LanDiscoveryConfig
impl UnwindSafe for LanDiscoveryConfig
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