pub struct Controller { /* private fields */ }Implementations§
Source§impl Controller
impl Controller
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new controller. Same as Controller::default.
Sourcepub fn wait_for_shutdown(&self) -> WaitForCancellationFuture<'_>
pub fn wait_for_shutdown(&self) -> WaitForCancellationFuture<'_>
Returns future to await shutdown signal.
Sourcepub fn spawn_handler(self) -> Result<JoinHandle<()>>
pub fn spawn_handler(self) -> Result<JoinHandle<()>>
Spawns a new handler which waits for shutdown signals.
§Errors
Will return Err if process wasn’t able to acquire quit and terminate signal handler.
Trait Implementations§
Source§impl Clone for Controller
impl Clone for Controller
Source§impl Default for Controller
impl Default for Controller
Source§fn default() -> Controller
fn default() -> Controller
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Controller
impl RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl UnwindSafe for Controller
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