mDNS/DNS-SD discovery for rtl_tcp servers — announce and browse the _rtl_tcp._tcp.local. service. Pure-Rust (mdns-sd), no Avahi/Bonjour, no async runtime.
//! Error types.
usethiserror::Error;/// Errors from advertiser / browser setup and runtime.
#[derive(Debug, Error)]pubenumDiscoveryError{/// Passed through from the underlying `mdns-sd` crate. Covers
/// daemon startup failures, bind errors, and malformed service
/// registrations.
#[error("mDNS daemon error: {0}")]
Mdns(#[from]mdns_sd::Error),/// A TXT record field contained content that mDNS can't carry
/// (e.g. a NUL byte, a value too long for the 255-byte per-entry
/// cap, or a key with an `=` in it).
#[error("invalid TXT record field: {0}")]
InvalidTxt(String),/// Generic IO error — thread spawn failures, socket operations
/// that surface an unrelated error, etc. Hostname lookup no
/// longer errors (it uses `libc::gethostname` + a
/// `"localhost"` fallback), but kept broad so future discovery
/// paths can reuse.
#[error("IO error: {0}")]
Io(std::io::Error),}