pub struct PromptWidget<'a> {
pub prompt: &'a PromptBuffer,
pub theme: Theme,
}Fields§
§prompt: &'a PromptBuffer§theme: ThemeImplementations§
Source§impl PromptWidget<'_>
impl PromptWidget<'_>
Sourcepub fn cursor_position(&self) -> (u16, u16)
pub fn cursor_position(&self) -> (u16, u16)
Cursor position relative to the widget’s area origin.
Returns (col, row) so it composes naturally with
(area.x + col, area.y + row) at the call site.
Sourcepub fn cursor_column(&self) -> u16
pub fn cursor_column(&self) -> u16
Backwards-compatible single-int cursor (column on the active row). Retained because some snapshot tests still reference it.
Trait Implementations§
Source§impl<'a> Debug for PromptWidget<'a>
impl<'a> Debug for PromptWidget<'a>
Auto Trait Implementations§
impl<'a> Freeze for PromptWidget<'a>
impl<'a> RefUnwindSafe for PromptWidget<'a>
impl<'a> Send for PromptWidget<'a>
impl<'a> Sync for PromptWidget<'a>
impl<'a> Unpin for PromptWidget<'a>
impl<'a> UnsafeUnpin for PromptWidget<'a>
impl<'a> UnwindSafe for PromptWidget<'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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more