pub struct Prompt {
pub prefix: Option<String>,
pub prompt: String,
pub suffix: Option<String>,
}
Expand description
User-defined prompt.
§Examples
You simply define a static prompt that holds a string. The prefix and suffix fields are intended for keybinds to change the prompt (ie the mode in vi).
let prompt = Prompt::from("prompt$ ");
assert_eq!(&prompt.to_string(), "prompt$ ");
Fields§
§prefix: Option<String>
§prompt: String
§suffix: Option<String>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Prompt
impl RefUnwindSafe for Prompt
impl Send for Prompt
impl Sync for Prompt
impl Unpin for Prompt
impl UnwindSafe for Prompt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more