Struct endbasic_std::testutils::RecordedProgram
source · pub struct RecordedProgram { /* private fields */ }
Expand description
A stored program that exposes golden contents and accepts new content from the console when edits are requested.
Trait Implementations§
source§impl Default for RecordedProgram
impl Default for RecordedProgram
source§fn default() -> RecordedProgram
fn default() -> RecordedProgram
Returns the “default value” for a type. Read more
source§impl Program for RecordedProgram
impl Program for RecordedProgram
source§fn 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
).source§fn edit<'life0, 'life1, 'async_trait>(
&'life0 mut self,
console: &'life1 mut dyn Console
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Edits the program interactively via the given
console
.source§fn 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
.