pub struct PromptSpec {
pub id: &'static str,
pub prefix: String,
pub placeholder: String,
pub placement: PromptPlacement,
pub live_update: bool,
}Expand description
How a prompt was opened. Semantics belong to hooks; this is only the view-model a frontend renders.
Fields§
§id: &'static strStable id so hooks recognize their own prompt ("search", "vim-ex").
prefix: StringLeading adornment ("/", ":", "").
placeholder: StringGhost text shown while the input is empty.
placement: PromptPlacementWhere the frontend should anchor the box.
live_update: boolHint that the hook refreshes live on every keystroke (search) rather than only on submit (ex-commands).
Implementations§
Source§impl PromptSpec
impl PromptSpec
Trait Implementations§
Source§impl Clone for PromptSpec
impl Clone for PromptSpec
Source§fn clone(&self) -> PromptSpec
fn clone(&self) -> PromptSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PromptSpec
impl Debug for PromptSpec
impl Eq for PromptSpec
Source§impl PartialEq for PromptSpec
impl PartialEq for PromptSpec
impl StructuralPartialEq for PromptSpec
Auto Trait Implementations§
impl Freeze for PromptSpec
impl RefUnwindSafe for PromptSpec
impl Send for PromptSpec
impl Sync for PromptSpec
impl Unpin for PromptSpec
impl UnsafeUnpin for PromptSpec
impl UnwindSafe for PromptSpec
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