Skip to main content

Module util

Module util 

Source
Expand description

Assorted helper utilities for the service binaries.

Structs§

Markdown
A reader over a Markdown document, used to extract embedded code blocks.

Statics§

DEFAULT_PAUSE_AFTER_GQL_MUTATIONS_SECS
Default pause, in seconds, inserted after GraphQL mutations in readme e2e tests.
DEFAULT_PAUSE_AFTER_LINERA_SERVICE_SECS
Default pause, in seconds, inserted after linera service commands in readme e2e tests.

Traits§

ChildExt
Extension trait for tokio::process::Child.

Functions§

eventually
Checks the condition five times with increasing delays. Returns true if it is met.
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_ascii_alphanumeric_string
Validates that a string contains only ASCII alphanumeric characters, returning it unchanged.
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 a string of milliseconds into a Duration.
parse_millis_delta
Parses a string of milliseconds into a TimeDelta.
parse_secs
Parses the string as a number of seconds into a Duration.
read_json
Reads and deserializes a JSON value from the file at the given path.
wait_for_next_round
Returns after the specified time or if we receive a notification that a new round has started.