Function scrawl::with

source ·
pub fn with<U: AsRef<[u8]>>(input: &U) -> Result<Reader, Box<dyn Error>>
Expand description

With opens a text buffer with the provided contents in an editor. Returns a Readble struct on success.

Example

    /* Opens the user's editor, buffer pre-filled with custom content */
    let input = scrawl::with(&"What is your favorite color")?;
    println!("{}", input.to_string()?);