Struct iroh_dns_server::dns::DnsHandler
source · pub struct DnsHandler { /* private fields */ }
Expand description
State for serving DNS
Implementations§
source§impl DnsHandler
impl DnsHandler
sourcepub fn new(zone_store: ZoneStore, config: &DnsConfig) -> Result<Self>
pub fn new(zone_store: ZoneStore, config: &DnsConfig) -> Result<Self>
Create a DNS server given some settings, a connection to the DB for DID-by-username lookups
and the server DID to serve under _did.<origin>
.
sourcepub async fn answer_request(&self, request: Request) -> Result<Bytes>
pub async fn answer_request(&self, request: Request) -> Result<Bytes>
Handle a DNS request
Trait Implementations§
source§impl Clone for DnsHandler
impl Clone for DnsHandler
source§fn clone(&self) -> DnsHandler
fn clone(&self) -> DnsHandler
Returns a copy of the value. Read more
1.0.0 · 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 DnsHandler
impl Debug for DnsHandler
source§impl RequestHandler for DnsHandler
impl RequestHandler for DnsHandler
source§fn handle_request<'life0, 'life1, 'async_trait, R>(
&'life0 self,
request: &'life1 Request,
response_handle: R
) -> Pin<Box<dyn Future<Output = ResponseInfo> + Send + 'async_trait>>where
R: 'async_trait + ResponseHandler,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_request<'life0, 'life1, 'async_trait, R>(
&'life0 self,
request: &'life1 Request,
response_handle: R
) -> Pin<Box<dyn Future<Output = ResponseInfo> + Send + 'async_trait>>where
R: 'async_trait + ResponseHandler,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Determines what needs to happen given the type of request, i.e. Query or Update. Read more
Auto Trait Implementations§
impl Freeze for DnsHandler
impl !RefUnwindSafe for DnsHandler
impl Send for DnsHandler
impl Sync for DnsHandler
impl Unpin for DnsHandler
impl !UnwindSafe for DnsHandler
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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