Skip to main content

Module util

Module util 

Source
Expand description

Assorted parsing and command-line helper utilities.

Functionsยง

non_zero_duration
Converts a Duration to Option<Duration>, treating zero as None.
parse_app_set
Parses a comma-separated list of application IDs into a set.
parse_chain_set
Parses a comma-separated list of chain IDs into a set.
parse_json
Parses the trimmed string as JSON into a value of type T.
parse_json_optional_millis_delta
Parses the JSON string as an optional number of milliseconds into an Option<TimeDelta>.
parse_millis
Parses the string as a number of milliseconds into a Duration.
parse_millis_delta
Parses the string as a number of milliseconds into a TimeDelta.
parse_secs
Parses the string as a number of seconds into a Duration.
wait_for_next_round
Returns after the specified time or if we receive a notification that a new round has started.