pub struct ResolverConfig {
pub dns_resolver: SocketAddr,
pub enforce_dnssec: bool,
pub timeout_ms: u64,
pub allow_http_fallback: bool,
pub network: Network,
}Expand description
Configuration for BIP-353 resolver
Fields§
§dns_resolver: SocketAddrThe DNS resolver to use (IP and port)
enforce_dnssec: boolWhether to enforce DNSSEC validation
timeout_ms: u64Timeout for DNS queries in milliseconds
allow_http_fallback: boolWhether to allow HTTP resolution fallback (for domains that don’t support BIP-353 DNS but do support LN-Address)
network: NetworkNetwork to use for parsing payment instructions
Implementations§
Source§impl ResolverConfig
impl ResolverConfig
Sourcepub fn with_dns_resolver(self, resolver: SocketAddr) -> Self
pub fn with_dns_resolver(self, resolver: SocketAddr) -> Self
Set the DNS resolver
Sourcepub fn with_dnssec(self, enforce: bool) -> Self
pub fn with_dnssec(self, enforce: bool) -> Self
Set the DNSSEC enforcement
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the timeout
Sourcepub fn with_http_fallback(self, allow: bool) -> Self
pub fn with_http_fallback(self, allow: bool) -> Self
Set whether to allow HTTP fallback
Sourcepub fn with_network(self, network: Network) -> Self
pub fn with_network(self, network: Network) -> Self
Set the network
Trait Implementations§
Source§impl Clone for ResolverConfig
impl Clone for ResolverConfig
Source§fn clone(&self) -> ResolverConfig
fn clone(&self) -> ResolverConfig
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 ResolverConfig
impl Debug for ResolverConfig
Auto Trait Implementations§
impl Freeze for ResolverConfig
impl RefUnwindSafe for ResolverConfig
impl Send for ResolverConfig
impl Sync for ResolverConfig
impl Unpin for ResolverConfig
impl UnsafeUnpin for ResolverConfig
impl UnwindSafe for ResolverConfig
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