# TextRunBounds

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/text_formatting/struct-textrunbounds/

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

```rust
struct TextRunBounds
```

The bounding rectangle of text run.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_formatting/text_run_bounds.rs#L8)

## Members

- [`text_source_character_index`](#function-text_source_character_index)
- [`length`](#function-length)
- [`rectangle`](#function-rectangle)
- [`text_run`](#function-text_run)

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

### text_source_character_index

```rust
fn text_source_character_index(self: &Self) -> i32
```

Character index of first character of text run.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_formatting/text_run_bounds.rs#L21)

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

### length

```rust
fn length(self: &Self) -> i32
```

Character length of text run.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_formatting/text_run_bounds.rs#L26)

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

### rectangle

```rust
fn rectangle(self: &Self) -> Rect
```

Text run bounding rectangle.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_formatting/text_run_bounds.rs#L31)

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

### text_run

```rust
fn text_run(self: &Self) -> &Rc<dyn TextRun>
```

Text run.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_formatting/text_run_bounds.rs#L36)

## Trait implementations

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

## Availability

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