Module golgi::utils

source · []
Expand description

Utility methods.

Functions

Take in an RPC request number along with a handling function and wait for an RPC response which matches the request number. Then, call the handling function on the response.

Take in an RPC request number along with a handling function (parsing results of type T) and produce an async_std::stream::Stream of results of type T, where the handling function is called on all RpcReader responses which match the request number.

Take in an RPC request number along with a handling function and call the handling function on all RPC responses which match the request number, appending the result of each parsed message to a vector until a CancelStreamResponse is found (marking the end of the stream).

Parse an array of bytes (returned by an rpc call) into a serde_json::Value.

Parse an array of bytes (returned by an rpc call) into a KVT.

Take in an RPC request number along with a handling function and call the handling function on all responses which match the request number. Then, prints out the result of the handling function.

Parse an array of bytes (returned by an rpc call) into an SsbMessageValue.

Parse an array of bytes (returned by an rpc call) into a String.