pub struct Builder { /* private fields */ }Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
Sourcepub fn icann_resolver(self, icann_resolver: SocketAddr) -> Self
pub fn icann_resolver(self, icann_resolver: SocketAddr) -> Self
Set the DNS resolver for normal ICANN domains. Defaults to 192.168.1.1:53
Sourcepub fn listen(self, listen: SocketAddr) -> Self
pub fn listen(self, listen: SocketAddr) -> Self
Set socket the server should listen on. Defaults to 0.0.0.0:53
Sourcepub fn handler(self, handler: impl CustomHandler + 'static) -> Self
pub fn handler(self, handler: impl CustomHandler + 'static) -> Self
Set handler to process the dns packet. Ok()`` should include a dns packet with answers. Err()` will fallback to ICANN.
pub async fn build(self) -> Result<AnyDNS>
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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