pub struct PromptContext<'a> { /* private fields */ }Implementations§
Source§impl<'a> PromptContext<'a>
impl<'a> PromptContext<'a>
pub fn prompt(&self) -> &'a str
pub fn message(&self) -> Option<&'a str>
Sourcepub const fn toc_hint_visible(&self) -> bool
Available on crate feature search only.
pub const fn toc_hint_visible(&self) -> bool
search only.Whether the outline navigation hint has not yet been acknowledged.
pub fn display_text(&self) -> &'a str
pub const fn columns(&self) -> usize
pub const fn rows(&self) -> usize
pub const fn content_rows(&self) -> usize
pub const fn panel_rows(&self) -> usize
pub const fn upper_mark(&self) -> usize
pub const fn left_mark(&self) -> usize
pub const fn formatted_lines(&self) -> usize
pub const fn logical_lines(&self) -> usize
pub const fn max_scroll_offset(&self) -> usize
pub fn scroll_percentage(&self) -> u8
pub fn numeric_prefix(&self) -> &'a str
pub const fn line_numbers(&self) -> LineNumbers
pub const fn line_wrapping(&self) -> bool
pub const fn follow_output(&self) -> bool
pub fn search_position(&self) -> Option<(usize, usize)>
Available on crate feature
search only.Available on crate feature search only.
search only.Returns the selected source line while line-navigation mode is active.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PromptContext<'a>
impl<'a> !UnwindSafe for PromptContext<'a>
impl<'a> Freeze for PromptContext<'a>
impl<'a> Send for PromptContext<'a>
impl<'a> Sync for PromptContext<'a>
impl<'a> Unpin for PromptContext<'a>
impl<'a> UnsafeUnpin for PromptContext<'a>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.