pub struct Prompt { /* private fields */ }Expand description
Manages the whole prompt.
Implementations§
Source§impl Prompt
impl Prompt
Sourcepub fn add_keybind(
&mut self,
key: Key,
callback: impl FnMut(&mut Buffer, Document<'_>) -> KeyAction + 'static,
)
pub fn add_keybind( &mut self, key: Key, callback: impl FnMut(&mut Buffer, Document<'_>) -> KeyAction + 'static, )
Adds a new keybind to the prompt. If you use one of the keys assigned to the default keybinds, it will override that command.
Sourcepub fn remove_keybind(&mut self, key: Key)
pub fn remove_keybind(&mut self, key: Key)
Removes a keybind
Trait Implementations§
Source§impl From<PromptBuilder> for Prompt
impl From<PromptBuilder> for Prompt
Source§fn from(b: PromptBuilder) -> Self
fn from(b: PromptBuilder) -> Self
Use PromptBuilder::into() to convert into a Prompt
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