Sets the initial name of the recorded program to `name` (if any) and its contents to `text`. Can only be called once and `text` must not be empty.
(self, name: Option<&str>, text: &str)
| 718 | /// Sets the initial name of the recorded program to `name` (if any) and its contents to `text`. |
| 719 | /// Can only be called once and `text` must not be empty. |
| 720 | pub fn set_program(self, name: Option<&str>, text: &str) -> Self { |
| 721 | assert!(!text.is_empty()); |
| 722 | { |
| 723 | let mut program = self.program.borrow_mut(); |
| 724 | assert!(program.text().is_empty()); |
| 725 | program.load(name, text); |
| 726 | } |
| 727 | self |
| 728 | } |
| 729 | |
| 730 | /// Creates or overwrites a file in the storage medium. |
| 731 | pub fn write_file(self, name: &str, content: &str) -> Self { |
no test coverage detected