Function edit::edit_bytes
source · pub fn edit_bytes<B: AsRef<[u8]>>(buf: B) -> Result<Vec<u8>>
Expand description
Open the contents of a string or buffer in the default editor and return them as raw bytes.
See edit
, the version of this function that takes and returns String
.
Arguments
buf
is written to the temporary file before invoking the editor.
Returns
If successful, returns the contents of the temporary file in raw (Vec<u8>
) form.