pub struct CommandTextObject {
starting_text: String,
pub text: String,
}
Expand description
Container for a string. Need to use a class that allows the text to be changed while the container (this class) remains constant. This way, operations can be applied to the text and the container’s contents change but not the container.
Fields§
§starting_text: String
Starting string text so we can reset the text to a known point.
text: String
The text that can change.
Implementations§
source§impl CommandTextObject
impl CommandTextObject
sourcepub fn new(text: &str) -> CommandTextObject
pub fn new(text: &str) -> CommandTextObject
Constructs a text object with an initial string.
Parameters
-
text
The initial string for the text object.