Function gstd::msg::reply_push_input
source · pub fn reply_push_input(range: impl RangeBounds<usize>) -> Result<()>
Expand description
Same as reply_push
but uses the input buffer as a payload source.
The argument of this method is the index range defining the input buffer’s piece to be pushed back to the output.
§Examples
Send half of the incoming payload back to the sender as a reply.
use gstd::msg;
#[no_mangle]
extern "C" fn handle() {
msg::reply_push_input(0..msg::size() / 2).expect("Unable to push");
msg::reply_commit(0).expect("Unable to commit");
}
§See also
MessageHandle::push_input
function allows using the input buffer as a payload source for an outgoing message.