# UnicodeData

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

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

```rust
struct UnicodeData
```

Helper for looking up unicode character class information.

This file contains only the packing-layout constants; the trie-backed
lookup helpers live in `unicode_data_lookups.rs`. The split mirrors the
upstream one, where the generator of the tables consumes the constants
without needing the generated tries (which it produces).

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

## Members

- [`get_general_category`](#function-get_general_category)
- [`get_script`](#function-get_script)
- [`get_bi_di_class`](#function-get_bi_di_class)
- [`get_bi_di_paired_bracket_type`](#function-get_bi_di_paired_bracket_type)
- [`get_bi_di_paired_bracket`](#function-get_bi_di_paired_bracket)
- [`get_line_break_class`](#function-get_line_break_class)
- [`get_word_break_class`](#function-get_word_break_class)
- [`get_grapheme_cluster_break`](#function-get_grapheme_cluster_break)
- [`get_sentence_break_class`](#function-get_sentence_break_class)
- [`get_is_emoji`](#function-get_is_emoji)
- [`get_has_emoji_presentation`](#function-get_has_emoji_presentation)
- [`get_is_default_ignorable`](#function-get_is_default_ignorable)
- [`get_east_asian_width_class`](#function-get_east_asian_width_class)
- [`has_script_extension`](#function-has_script_extension)

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

### get_general_category

```rust
fn get_general_category(codepoint: u32) -> GeneralCategory
```

Gets the `GeneralCategory` for a Unicode codepoint.

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

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

### get_script

```rust
fn get_script(codepoint: u32) -> Script
```

Gets the `Script` for a Unicode codepoint.

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

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

### get_bi_di_class

```rust
fn get_bi_di_class(codepoint: u32) -> BidiClass
```

Gets the `BidiClass` for a Unicode codepoint.

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

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

### get_bi_di_paired_bracket_type

```rust
fn get_bi_di_paired_bracket_type(codepoint: u32) -> BidiPairedBracketType
```

Gets the `BidiPairedBracketType` for a Unicode codepoint.

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

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

### get_bi_di_paired_bracket

```rust
fn get_bi_di_paired_bracket(codepoint: u32) -> Codepoint
```

Gets the paired bracket for a Unicode codepoint.

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

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

### get_line_break_class

```rust
fn get_line_break_class(codepoint: u32) -> LineBreakClass
```

Gets the line break class for a Unicode codepoint.

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

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

### get_word_break_class

```rust
fn get_word_break_class(codepoint: u32) -> WordBreakClass
```

Gets the word break class for a Unicode codepoint.

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

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

### get_grapheme_cluster_break

```rust
fn get_grapheme_cluster_break(codepoint: u32) -> GraphemeBreakClass
```

Gets the grapheme break type for the Unicode codepoint.

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

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

### get_sentence_break_class

```rust
fn get_sentence_break_class(codepoint: u32) -> SentenceBreakClass
```

Gets the sentence break class for the Unicode codepoint (UAX #29).

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

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

### get_is_emoji

```rust
fn get_is_emoji(codepoint: u32) -> bool
```

Gets whether the codepoint has the Unicode `Emoji` property.

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

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

### get_has_emoji_presentation

```rust
fn get_has_emoji_presentation(codepoint: u32) -> bool
```

Gets whether the codepoint has the Unicode `Emoji_Presentation` property, i.e. whether
it defaults to an emoji presentation when no variation selector is present.

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

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

### get_is_default_ignorable

```rust
fn get_is_default_ignorable(codepoint: u32) -> bool
```

Gets whether the codepoint has the Unicode `Default_Ignorable_Code_Point` property.

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

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

### get_east_asian_width_class

```rust
fn get_east_asian_width_class(codepoint: u32) -> EastAsianWidthClass
```

Gets the EastAsianWidth class for the Unicode codepoint.

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

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

### has_script_extension

```rust
fn has_script_extension(codepoint: u32, script: Script) -> bool
```

Determines whether the given codepoint's Script_Extensions property (UAX #24) contains
the supplied script. When the codepoint has no explicit Script_Extensions entry the
extensions set is taken to be the singleton of the codepoint's primary
`Script` property.

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

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