# FormattingObjectPool

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

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

```rust
struct FormattingObjectPool
```

Contains various list pools that are commonly used during text formatting.

This class provides an instance per thread.

In most applications, there'll be only one instance: on the UI thread,
which is responsible for layout.

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

## Members

- [`text_run_lists`](#struct_field-text_run_lists)
- [`unshaped_text_run_lists`](#struct_field-unshaped_text_run_lists)
- [`text_lines`](#struct_field-text_lines)
- [`instance`](#function-instance)
- [`verify_all_returned`](#function-verify_all_returned)

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

### text_run_lists

```rust
text_run_lists: ListPool<std::rc::Rc<dyn TextRun>>
```



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

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

### unshaped_text_run_lists

```rust
unshaped_text_run_lists: ListPool<std::rc::Rc<crate::media::text_formatting::UnshapedTextRun>>
```



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

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

### text_lines

```rust
text_lines: ListPool<std::rc::Rc<dyn TextLine>>
```



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

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

### instance

```rust
fn instance() -> &'static FormattingObjectPool
```

The pool of the current thread.

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

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

### verify_all_returned

```rust
fn verify_all_returned(self: &Self)
```

Checks (in debug builds) that every rented list was returned.

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

## Trait implementations

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

## Availability

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