Skip to main content

Module util

Module util 

Source
Expand description

Utility functions and types

Structs§

MatchDispatch
Role-agnostic helper for pattern-matching on untyped JSON-RPC messages.
MatchDispatchFrom
Role-aware helper for pattern-matching on untyped JSON-RPC requests.
TypeNotification
Builder for pattern-matching on untyped JSON-RPC notifications.

Functions§

both
Run two fallible futures concurrently, returning when both complete successfully or when either fails.
internal_error
Creates an internal error with the given message
into_jsonrpc_error
Convert a crate::Error into a crate::jsonrpcmsg::Error
json_cast
Cast from N to M by serializing/deserialization to/from JSON.
json_cast_params
Cast incoming request/notification params into a typed payload.
parse_error
Creates a parse error with the given message
process_stream_concurrently
Process items from a stream concurrently.
run_until
Run background until foreground completes.