[][src]Module spirit::utils

Various utilities.

All the little things that are useful through the spirit's or user's code, and don't really fit anywhere else.

Structs

Hidden

A wrapper to hide a configuration field from logs.

MissingEquals

An error returned when the user passes a key-value option without the equal sign.

Functions

absolute_from_os_str

Tries to read an absolute path from the given OS string.

cleanup_signals

Remove the signals handling termination.

deserialize_duration

Deserialize a human-readable duration.

deserialize_opt_duration

Deserialize an Option<Duration> using the humantime crate.

is_default

Checks if value is default.

is_true

Checks if value is set to true.

key_val

A helper for deserializing map-like command line arguments.

serialize_duration

Serialize a duration.

serialize_opt_duration

Serialize an Option<Duration> in a human friendly form.