pub struct TextEditOutcome {
pub text_changed: bool,
pub state_changed: bool,
pub clipboard_write: Option<String>,
pub clipboard_read: bool,
}Expand description
Side effects after applying an edit action.
Clipboard fields are requests for the host integration; this crate performs no operating-system clipboard I/O. The default represents a complete no-op.
§Examples
use ailloli_ui_text::TextEditOutcome;
let outcome = TextEditOutcome::default();
assert!(!outcome.text_changed);
assert!(!outcome.state_changed);
assert_eq!(outcome.clipboard_write, None);
assert!(!outcome.clipboard_read);Fields§
§text_changed: boolWhether the action executed a committed-buffer mutation.
state_changed: boolWhether caret, selection, IME, history-restored state, or text state changed.
clipboard_write: Option<String>Selected UTF-8 text the host should write, or None for no write request.
clipboard_read: boolWhether the host should read text and later dispatch TextEditAction::Paste.
Trait Implementations§
Source§impl Clone for TextEditOutcome
impl Clone for TextEditOutcome
Source§fn clone(&self) -> TextEditOutcome
fn clone(&self) -> TextEditOutcome
Returns a copy of the value. Read more
1.0.0 · 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 TextEditOutcome
impl Debug for TextEditOutcome
Source§impl Default for TextEditOutcome
impl Default for TextEditOutcome
Source§fn default() -> TextEditOutcome
fn default() -> TextEditOutcome
Returns the “default value” for a type. Read more
Source§impl PartialEq for TextEditOutcome
impl PartialEq for TextEditOutcome
impl Eq for TextEditOutcome
impl StructuralPartialEq for TextEditOutcome
Auto Trait Implementations§
impl Freeze for TextEditOutcome
impl RefUnwindSafe for TextEditOutcome
impl Send for TextEditOutcome
impl Sync for TextEditOutcome
impl Unpin for TextEditOutcome
impl UnwindSafe for TextEditOutcome
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.