Struct add_ed::Ed

source · []
pub struct Ed<'a, B: Buffer> { /* private fields */ }
Expand description

The state variable used by the editor to track its internal state

Implementations

Construct a new instance of Ed

  • An empty file string is recommended if no filepath is opened
  • Note that you can initialise the buffer with contents before this, but those contents will be overwritten if a path is given.
  • macros behave like scripts given to the ‘g’ command an example is “a\n\n.\n” which appends an empty line

Run the given command

Returns true if the command was to quit

Run given instance of Ed until it receives a command to quit or errors

The returned error type could be improved, suggestions welcome.

Get an immutable reference to part of the editors state

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.