pub struct Daemon {
pub address: String,
/* private fields */
}Expand description
A server daemon handle that can be controlled externally
Fields§
§address: StringAddress the server is listening on
Implementations§
Source§impl Daemon
impl Daemon
Sourcepub async fn run(self) -> Result<()>
👎Deprecated since 1.3.0: does nothing: the server started by start_daemon_no_signals() is already running
pub async fn run(self) -> Result<()>
does nothing: the server started by start_daemon_no_signals() is already running
Run the daemon until completion or shutdown signal
This does nothing and returns immediately: the server is already running once
start_daemon_no_signals has returned the handle.
Sourcepub async fn shutdown_with_timeout(&mut self, _timeout: Duration) -> Result<()>
👎Deprecated since 1.3.0: the timeout argument is ignored; set ServerConfig::shutdown_timeout and call shutdown()
pub async fn shutdown_with_timeout(&mut self, _timeout: Duration) -> Result<()>
the timeout argument is ignored; set ServerConfig::shutdown_timeout and call shutdown()
Shutdown the daemon with a custom timeout
The timeout argument is not used: the server waits for open connections for
ServerConfig::shutdown_timeout, fixed when it was started. This is the same
as shutdown.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Daemon
impl !UnwindSafe for Daemon
impl Freeze for Daemon
impl Send for Daemon
impl Sync for Daemon
impl Unpin for Daemon
impl UnsafeUnpin for Daemon
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