#[repr(C)]pub struct PendingTextEdit {
pub node: DomNodeId,
pub inserted_text: AzString,
pub old_text: AzString,
}Expand description
Information about a pending text edit that hasn’t been applied yet
Fields§
§node: DomNodeIdThe node that was edited
inserted_text: AzStringThe text that was inserted
old_text: AzStringThe old text before the edit (plain text extracted from InlineContent)
Implementations§
Source§impl PendingTextEdit
impl PendingTextEdit
Sourcepub fn resulting_text(&self, cursor: Option<&TextCursor>) -> AzString
pub fn resulting_text(&self, cursor: Option<&TextCursor>) -> AzString
Compute the resulting text after applying the edit
This is a pure function that applies the inserted_text to old_text using the current cursor position.
NOTE: Actual text application is handled by apply_text_changeset() in window.rs which uses text3::edit::insert_text() for proper cursor-based insertion. This method is for preview/inspection purposes only.
Trait Implementations§
Source§impl Clone for PendingTextEdit
impl Clone for PendingTextEdit
Source§fn clone(&self) -> PendingTextEdit
fn clone(&self) -> PendingTextEdit
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for PendingTextEdit
impl RefUnwindSafe for PendingTextEdit
impl Send for PendingTextEdit
impl Sync for PendingTextEdit
impl Unpin for PendingTextEdit
impl UnwindSafe for PendingTextEdit
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