Function bytes
fn bytes<impl FnMut(usize, &mut Vec<u8>): FnMut(usize, &mut alloc::vec::Vec<u8>), impl FnMut(&str) -> Option<usize>: FnMut(&str) -> Option<usize>>(replacement: &[u8], append: impl FnMut(usize, &mut Vec<u8>), name_to_index: impl FnMut(&str) -> Option<usize>, dst: &mut Vec<u8>)
Accepts a replacement byte string and interpolates capture references with their corresponding values.
append should be a function that appends the byte string value of a
capture group at a particular index to the byte string given. If the
capture group index is invalid, then nothing should be appended.
name_to_index should be a function that maps a capture group name to a
capture group index. If the given name doesn't exist, then None should
be returned.
Finally, dst is where the final interpolated contents should be written.
If replacement contains no capture group references, then dst will be
equivalent to replacement.
See the module documentation for details about the format supported.
Example
use interpolate;
let mut dst = vec!;
bytes;
assert_eq!;