# CharacterToGlyphMapDictionary

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/fonts/tables/cmap/struct-charactertoglyphmapdictionary/

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

```rust
struct CharacterToGlyphMapDictionary
```

A read-only dictionary view (code point to glyph) over a
[`CharacterToGlyphMap`](/docs/0.5.0/api/ferroui-base/media/fonts/tables/cmap/struct-charactertoglyphmap/).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L8)

## Members

- [`new`](#function-new)
- [`get`](#function-get)
- [`keys`](#function-keys)
- [`values`](#function-values)
- [`count`](#function-count)
- [`contains_key`](#function-contains_key)
- [`try_get_value`](#function-try_get_value)
- [`iter`](#function-iter)

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

### new

```rust
fn new(map: CharacterToGlyphMap) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L15)

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

### get

```rust
fn get(self: &Self, key: i32) -> u16
```

The glyph for the code point (the reference's indexer).

Panics when the code point is not in the map; use
`try_get_value` for untrusted keys.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L23)

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

### keys

```rust
fn keys(self: &Self) -> impl Iterator<Item = i32> + '_
```

The mapped code points, in range order.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L31)

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

### values

```rust
fn values(self: &Self) -> impl Iterator<Item = u16> + '_
```

The glyphs of the mapped code points, in range order.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L39)

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

### count

```rust
fn count(self: &Self) -> i32
```

The number of mapped code points (computed once).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L44)

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

### contains_key

```rust
fn contains_key(self: &Self, key: i32) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L58)

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

### try_get_value

```rust
fn try_get_value(self: &Self, key: i32) -> Option<u16>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L62)

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

### iter

```rust
fn iter(self: &Self) -> impl Iterator<Item = (i32, u16)> + '_
```

Enumerates the `(code point, glyph)` pairs, in range order.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/cmap/character_to_glyph_map_dictionary.rs#L67)

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