pub struct TextDelta {
pub content: String,
pub position: usize,
pub total_length: usize,
}Expand description
A text delta with position information.
This struct is emitted by TextDeltaStream when using text_accumulated().
It provides incremental text content along with position metadata,
avoiding O(n²) string cloning.
Fields§
§content: StringThe actual delta content (just the new text, not the full accumulated string).
position: usizePosition where this delta starts in the accumulated text.
total_length: usizeTotal length of accumulated text after this delta.
Implementations§
Trait Implementations§
impl Eq for TextDelta
impl StructuralPartialEq for TextDelta
Auto Trait Implementations§
impl Freeze for TextDelta
impl RefUnwindSafe for TextDelta
impl Send for TextDelta
impl Sync for TextDelta
impl Unpin for TextDelta
impl UnwindSafe for TextDelta
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