# ImmutableTextDecoration

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

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

```rust
struct ImmutableTextDecoration
```

An immutable representation of a text decoration.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_text_decoration.rs#L6)

## Members

- [`new`](#function-new)
- [`location`](#function-location)
- [`pen`](#function-pen)
- [`pen_thickness_unit`](#function-pen_thickness_unit)
- [`pen_offset`](#function-pen_offset)
- [`pen_offset_unit`](#function-pen_offset_unit)

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

### new

```rust
fn new(location: TextDecorationLocation, pen: ImmutablePen, pen_thickness_unit: TextDecorationUnit, pen_offset: f64, pen_offset_unit: TextDecorationUnit) -> ImmutableTextDecoration
```

Creates a text decoration.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_text_decoration.rs#L16)

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

### location

```rust
fn location(self: &Self) -> TextDecorationLocation
```

Gets the location.

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

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

### pen

```rust
fn pen(self: &Self) -> &ImmutablePen
```

Gets the pen.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_text_decoration.rs#L32)

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

### pen_thickness_unit

```rust
fn pen_thickness_unit(self: &Self) -> TextDecorationUnit
```

Gets the units in which the thickness of the pen is expressed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_text_decoration.rs#L37)

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

### pen_offset

```rust
fn pen_offset(self: &Self) -> f64
```

Gets the pen offset.

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

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

### pen_offset_unit

```rust
fn pen_offset_unit(self: &Self) -> TextDecorationUnit
```

Gets the units in which the pen offset is expressed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_text_decoration.rs#L47)

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

## Availability

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