Struct clt::Editor

source ·
pub struct Editor<'a, 'k, 'v> { /* private fields */ }
Expand description

One editor for you to edit the given text or file.

Implementations

Create one new editor.

Inserts or updates an environment variable mapping.

Edit a file. Examples:

use clt::Editor;

let editor = Editor::new("vim");
editor.edit_file("/path/to/myfile.py");

Edit some text. Examples:

use clt::Editor;

let editor = Editor::new("vim");
let mut text = String::new();
text.push_str("hello");
let edited = editor.edit(text, ".txt");

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.