pub struct TextAreaResponse {
pub changed: bool,
pub text: String,
pub supported: bool,
pub focused: bool,
pub cursor_pos: (usize, usize),
}Expand description
Result of a text_area widget.
Mirrors TextInputResponse but adds a cursor_pos field that reports the
line/column of the caret inside the multi-line buffer.
Fields§
§changed: boolWhether the text changed this frame.
text: StringThe current full text contents (lines separated by '\n').
supported: boolWhether the active adapter actually rendered this widget.
focused: boolWhether this text area currently has keyboard focus.
cursor_pos: (usize, usize)(line, column) zero-based caret position within the buffer.
Implementations§
Source§impl TextAreaResponse
impl TextAreaResponse
Sourcepub fn unsupported() -> Self
pub fn unsupported() -> Self
The “not implemented by this adapter” response: empty text, not changed,
supported = false.
Trait Implementations§
Source§impl Clone for TextAreaResponse
impl Clone for TextAreaResponse
Source§fn clone(&self) -> TextAreaResponse
fn clone(&self) -> TextAreaResponse
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 TextAreaResponse
impl Debug for TextAreaResponse
Source§impl Default for TextAreaResponse
impl Default for TextAreaResponse
Source§fn default() -> TextAreaResponse
fn default() -> TextAreaResponse
Returns the “default value” for a type. Read more
Source§impl PartialEq for TextAreaResponse
impl PartialEq for TextAreaResponse
impl StructuralPartialEq for TextAreaResponse
Auto Trait Implementations§
impl Freeze for TextAreaResponse
impl RefUnwindSafe for TextAreaResponse
impl Send for TextAreaResponse
impl Sync for TextAreaResponse
impl Unpin for TextAreaResponse
impl UnsafeUnpin for TextAreaResponse
impl UnwindSafe for TextAreaResponse
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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