# SentenceBreakEnumerator

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

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

```rust
struct SentenceBreakEnumerator<'a>
```

Enumerates Unicode sentence-boundary segments per UAX #29 rules SB1–SB11, SB998.

The enumerator borrows the text, so every operation is allocation-free. It reads
codepoints with `Codepoint::read_at` and classifies them via the [`SentenceBreakClass`](/docs/0.5.0/api/ferroui-base/media/text_formatting/unicode/enum-sentencebreakclass/)
property backed by the segmentation trie. Each codepoint is visited a constant
number of times: the left-hand context every rule needs is folded into a few fields as the
walk advances, and the one rule that looks ahead reuses the scan it already made.

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

## Members

- [`new`](#function-new)
- [`move_next`](#function-move_next)

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

### new

```rust
const fn new(text: &'a [u16]) -> Self
```

Initializes a new instance of the `SentenceBreakEnumerator` struct.

* `text` - The text to enumerate sentence segments over.

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

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

### move_next

```rust
fn move_next(self: &mut Self) -> Option<SentenceSegment<'a>>
```

Moves to the next `SentenceSegment`.

Returns the current sentence-boundary segment, or `None` at the end of the text.

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

## 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`
- `IntoIterator`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `Iterator`

## Availability

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