Struct iroh_dns_server::server::Server
source · pub struct Server { /* private fields */ }
Expand description
The iroh-dns server.
Implementations§
source§impl Server
impl Server
sourcepub async fn spawn(config: Config, store: ZoneStore) -> Result<Self>
pub async fn spawn(config: Config, store: ZoneStore) -> Result<Self>
Spawn the server.
This will spawn several background tasks:
- A DNS server task
- A HTTP server task, if
config.http
is not empty - A HTTPS server task, if
config.https
is not empty
sourcepub async fn shutdown(self) -> Result<()>
pub async fn shutdown(self) -> Result<()>
Cancel the server tasks and wait for all tasks to complete.
sourcepub async fn run_until_error(self) -> Result<()>
pub async fn run_until_error(self) -> Result<()>
Wait for all tasks to complete.
This will run forever unless all tasks close with an error, or Self::cancel
is called.
Auto Trait Implementations§
impl Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
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