Skip to main content

encode_command_borrowed

Function encode_command_borrowed 

Source
pub fn encode_command_borrowed<A: AsRef<[u8]>>(out: &mut Vec<u8>, args: &[A])
Expand description

Generic version of encode_command that takes any slice-of-bytes- like argv (&[Vec<u8>], &[&[u8]], &[[u8; N]], …). Lets a Rust caller pass a stack-allocated [&[u8]; N] and skip the per-call Vec<Vec<u8>> argv allocation — measured win on the kevy-client::Connection single-connection path.