# TextLineBreak

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

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

```rust
struct TextLineBreak
```

Represents the state of a line break: how the line ended and what the
next line has to continue with.

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

## Members

- [`new`](#function-new)
- [`text_end_of_line`](#function-text_end_of_line)
- [`flow_direction`](#function-flow_direction)
- [`is_split`](#function-is_split)

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

### new

```rust
fn new(text_end_of_line: Option<Rc<dyn TextRun>>, flow_direction: FlowDirection, is_split: bool) -> Self
```

Creates a line break.

`text_end_of_line` is the end of line run (a run whose
`as_text_end_of_line` is `Some`) when the line ended with one.

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

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

### text_end_of_line

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

Get the end of line run.

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

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

### flow_direction

```rust
fn flow_direction(self: &Self) -> FlowDirection
```

Get the flow direction for remaining characters.

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

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

### is_split

```rust
fn is_split(self: &Self) -> bool
```

Gets whether there were remaining runs after this line break, that
were split up by the `TextFormatter` during the formatting process.

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

## 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`
- `Drop`

## Availability

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