# DocumentChangedEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/documents/struct-documentchangedeventargs/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct DocumentChangedEventArgs
```

One committed, coalesced document update. `range` addresses the old version;
the replacement's length is measured in UTF-16 code units.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L105)

## Members

- [`revision`](#struct_field-revision)
- [`range`](#struct_field-range)
- [`removed_length`](#struct_field-removed_length)
- [`inserted_length`](#struct_field-inserted_length)
- [`old_length`](#struct_field-old_length)
- [`new_length`](#struct_field-new_length)
- [`kind`](#struct_field-kind)
- [`changes`](#struct_field-changes)
- [`map_position`](#function-map_position)

<a id="struct_field-revision"></a>

### revision

```rust
revision: u64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L106)

<a id="struct_field-range"></a>

### range

```rust
range: std::ops::Range<usize>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L107)

<a id="struct_field-removed_length"></a>

### removed_length

```rust
removed_length: usize
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L108)

<a id="struct_field-inserted_length"></a>

### inserted_length

```rust
inserted_length: usize
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L109)

<a id="struct_field-old_length"></a>

### old_length

```rust
old_length: usize
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L110)

<a id="struct_field-new_length"></a>

### new_length

```rust
new_length: usize
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L111)

<a id="struct_field-kind"></a>

### kind

```rust
kind: DocumentChangeKind
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L112)

<a id="struct_field-changes"></a>

### changes

```rust
changes: Vec<DocumentTextChange>
```

Sequential replacements inside an edit batch, retaining interior anchors.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L114)

<a id="function-map_position"></a>

### map_position

```rust
fn map_position(self: &Self, position: TextPosition) -> TextPosition
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/rich_text_document.rs#L118)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
