fedimint_core

Module util

Source
Expand description

General purpose utilities

Modules§

backoff_util
broadcaststream
Copied from tokio_stream 0.1.12 to use our optional Send bounds
error 🔒
update_merge

Structs§

FmtCompactErrorAnyhow
A wrapper with fmt::Display for anyhow::Error that will print chain of causes
FmtErrorCompact
A wrapper with fmt::Display for any E : Error that will print chain of causes
SafeUrl
Wrapper for Url that only prints the scheme, domain, port and path portion of a Url in its Display implementation.
Spanned

Enums§

SafeUrlError

Traits§

FmtCompact
Simple utility trait to print error chains
FmtCompactAnyhow
Simple utility trait to print error chains (for anyhow::Error)
NextOrPending

Functions§

get_average
Computes the average of the given u64 slice.
get_median
Computes the median from a slice of sorted u64s
handle_version_hash_command
For CLIs, detects version-hash as a single argument, prints the provided version hash, then exits the process.
retry
Run the supplied closure op_fn until it succeeds. Frequency and number of retries is determined by the specified strategy.
write_new
Write out a new file (like std::fs::write but fails if file already exists)
write_new_async
write_overwrite
write_overwrite_async

Type Aliases§

BoxFuture
Future that is Send unless targeting WASM
BoxStream
Stream that is Send unless targeting WASM