Struct endbasic_repl::editor::Editor
source · [−]pub struct Editor { /* private fields */ }Expand description
An interactive console-based text editor.
The text editor owns the textual contents it is editing.
Trait Implementations
sourceimpl Program for Editor
impl Program for Editor
sourcefn is_dirty(&self) -> bool
fn is_dirty(&self) -> bool
Returns true if the program was modified since it was last saved (as indicated by a call to
set_name). Read more
sourcefn edit<'life0, 'life1, 'async_trait>(
&'life0 mut self,
console: &'life1 mut dyn Console
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn edit<'life0, 'life1, 'async_trait>(
&'life0 mut self,
console: &'life1 mut dyn Console
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Edits the program interactively via the given console.
sourcefn load(&mut self, name: Option<&str>, text: &str)
fn load(&mut self, name: Option<&str>, text: &str)
Reloads the contents of the stored program with the given text and tracks them as coming
from the file given in name. Read more
Auto Trait Implementations
impl RefUnwindSafe for Editor
impl Send for Editor
impl Sync for Editor
impl Unpin for Editor
impl UnwindSafe for Editor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more