# BidiReorderer

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

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

```rust
struct BidiReorderer
```

Reorders text runs according to their bidi level.

To avoid allocations, the scratch buffers of this type are kept per thread
and reused.

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

## Members

- [`bidi_reorder`](#function-bidi_reorder)

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

### bidi_reorder

```rust
fn bidi_reorder(text_runs: &mut [Rc<dyn TextRun>], flow_direction: FlowDirection, first_text_source_index: i32) -> Rc<[IndexedTextRun]>
```

Reorders `text_runs` into visual order using the reorderer of the
current thread and returns the logical run table.

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

## 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/).
