# LineBreak

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

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

```rust
struct LineBreak
```

Information about a potential line break position

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

## Members

- [`new`](#function-new)
- [`position_measure`](#function-position_measure)
- [`position_wrap`](#function-position_wrap)
- [`required`](#function-required)

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

### new

```rust
const fn new(position_measure: usize, position_wrap: usize, required: bool) -> Self
```

Constructor

* `position_measure` - The code point index to measure to
* `position_wrap` - The code point index to actually break the line at
* `required` - True if this is a required line break; otherwise false

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

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

### position_measure

```rust
const fn position_measure(self: &Self) -> usize
```

The break position, before any trailing whitespace

This doesn't include trailing whitespace

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

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

### position_wrap

```rust
const fn position_wrap(self: &Self) -> usize
```

The break position, after any trailing whitespace

This includes trailing whitespace

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

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

### required

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

True if there should be a forced line break here

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`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/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`

## Availability

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