[−][src]Function edit::edit_bytes_with_builder
pub fn edit_bytes_with_builder<B: AsRef<[u8]>>(
buf: B,
builder: &Builder
) -> Result<Vec<u8>>
Open the contents of a string or buffer in the default editor using a temporary file with a custom path or filename and return them as raw bytes.
See edit_with_builder
, the version of this function that takes and returns String
.
Other than the custom Builder
, this function is identical to edit_bytes
.
Arguments
builder
is used to create a temporary file, potentially with a custom name, path, or prefix.
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.