Struct safeword::Safeword[][src]

pub struct Safeword { /* fields omitted */ }

A modified Tokio runtime that exits early on a signal.

The Default impl returns a Safeword that exits on SIGINT (Ctrl-C) or SIGTERM (what init systems normally use to terminate a process).

Methods

impl Safeword
[src]

Create a Safeword that has no configured signals.

Exit early on a Unix signal.

Run the given Future.

Returns Ok(()) if the runtime was terminated by a configured signal. Returns Err if anything else happens, including the Future exiting of its own volition, or if something internal to Safeword fails.

Trait Implementations

impl Debug for Safeword
[src]

Formats the value using the given formatter. Read more

impl Default for Safeword
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Safeword

impl Sync for Safeword