Function gstd::msg::reply_push
source · pub fn reply_push<T: AsRef<[u8]>>(payload: T) -> Result<()>
Expand description
Push a payload part to the current reply message.
Some programs can rely on their messages to other programs, i.e., check
another program’s state and use it as a parameter for its own business
logic. The basic implementation is covered in the reply_bytes
function.
This function allows filling the reply payload
parts via reply_push
during the message handling. The payload can consist of several parts.
Note that an incomplete reply message will be dropped if the
reply_commit
function has not been called before the current execution
ends.
§Examples
See the reply_commit
examples.
§See also
reply_commit
function finalizes and sends the current reply message.