Struct add_ed::Ed [−][src]
pub struct Ed<'a, B: Buffer> { /* fields omitted */ }
Expand description
The state variable used by the editor to track its internal state
Implementations
impl<'a, B: Buffer> Ed<'a, B>
[src]
impl<'a, B: Buffer> Ed<'a, B>
[src]pub fn new(buffer: &'a mut B, path: String) -> Result<Self, &'static str>
[src]
pub fn new(buffer: &'a mut B, path: String) -> Result<Self, &'static str>
[src]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
pub fn run_command(
&mut self,
ui: &mut dyn UI,
command: &str
) -> Result<bool, &'static str>
[src]
pub fn run_command(
&mut self,
ui: &mut dyn UI,
command: &str
) -> Result<bool, &'static str>
[src]Run the given command Returns true if the command was to quit The error is inherited from UI
pub fn run_macro(&mut self, ui: &mut dyn UI) -> Result<(), &'static str>
[src]
pub fn run_macro(&mut self, ui: &mut dyn UI) -> Result<(), &'static str>
[src]Run given instance of Ed until it receives a command to quit or errors The returned error type could be improved, suggestions welcome.
pub fn run(&mut self, ui: &mut dyn UI) -> Result<(), &'static str>
[src]
Auto Trait Implementations
impl<'a, B> RefUnwindSafe for Ed<'a, B> where
B: RefUnwindSafe,
B: RefUnwindSafe,
impl<'a, B> Send for Ed<'a, B> where
B: Send,
B: Send,
impl<'a, B> Sync for Ed<'a, B> where
B: Sync,
B: Sync,