# Contact

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-contact/

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

```rust
struct Contact
```

A contact (the Windows Runtime's `Contact`, the members a person picture reads): its
identifier, its names and its pictures.

The Windows contact store has no counterpart off Windows, so an application fills the contact
itself. The pictures are images (the Windows Runtime's are stream references, which the
picture opens and decodes asynchronously); the display name is the override, or the first
and last names joined by a space (the Windows Runtime composes it from every part of the
name).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L22)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`id_property`](#function-id_property)
- [`first_name_property`](#function-first_name_property)
- [`last_name_property`](#function-last_name_property)
- [`display_name_override_property`](#function-display_name_override_property)
- [`small_display_picture_property`](#function-small_display_picture_property)
- [`large_display_picture_property`](#function-large_display_picture_property)
- [`source_display_picture_property`](#function-source_display_picture_property)
- [`thumbnail_property`](#function-thumbnail_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`id`](#function-id)
- [`set_id`](#function-set_id)
- [`first_name`](#function-first_name)
- [`set_first_name`](#function-set_first_name)
- [`last_name`](#function-last_name)
- [`set_last_name`](#function-set_last_name)
- [`display_name_override`](#function-display_name_override)
- [`set_display_name_override`](#function-set_display_name_override)
- [`display_name`](#function-display_name)
- [`small_display_picture`](#function-small_display_picture)
- [`set_small_display_picture`](#function-set_small_display_picture)
- [`large_display_picture`](#function-large_display_picture)
- [`set_large_display_picture`](#function-set_large_display_picture)
- [`source_display_picture`](#function-source_display_picture)
- [`set_source_display_picture`](#function-set_source_display_picture)
- [`thumbnail`](#function-thumbnail)
- [`set_thumbnail`](#function-set_thumbnail)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L26)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<Contact>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L26)

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

### id_property

```rust
fn id_property() -> &'static StyledProperty<String>
```

Defines the `Id` property: the identifier of the contact.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L33)

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

### first_name_property

```rust
fn first_name_property() -> &'static StyledProperty<String>
```

Defines the `FirstName` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L33)

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

### last_name_property

```rust
fn last_name_property() -> &'static StyledProperty<String>
```

Defines the `LastName` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L33)

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

### display_name_override_property

```rust
fn display_name_override_property() -> &'static StyledProperty<String>
```

Defines the `DisplayNameOverride` property: the display name, when it is not the first
and the last names.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L33)

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

### small_display_picture_property

```rust
fn small_display_picture_property() -> &'static StyledProperty<Option<Rc<dyn IImageBrushSource>>>
```

Defines the `SmallDisplayPicture` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L33)

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

### large_display_picture_property

```rust
fn large_display_picture_property() -> &'static StyledProperty<Option<Rc<dyn IImageBrushSource>>>
```

Defines the `LargeDisplayPicture` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L33)

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

### source_display_picture_property

```rust
fn source_display_picture_property() -> &'static StyledProperty<Option<Rc<dyn IImageBrushSource>>>
```

Defines the `SourceDisplayPicture` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L33)

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

### thumbnail_property

```rust
fn thumbnail_property() -> &'static StyledProperty<Option<Rc<dyn IImageBrushSource>>>
```

Defines the `Thumbnail` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L33)

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

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L94)

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

### new

```rust
fn new() -> Ref<Self>
```

Creates an empty contact.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L99)

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

### id

```rust
fn id(self: &Self) -> String
```

Gets the identifier of the contact.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L104)

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

### set_id

```rust
fn set_id(self: &Self, value: impl Into<String>)
```

Sets the identifier of the contact.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L109)

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

### first_name

```rust
fn first_name(self: &Self) -> String
```

Gets the first name.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L114)

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

### set_first_name

```rust
fn set_first_name(self: &Self, value: impl Into<String>)
```

Sets the first name.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L119)

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

### last_name

```rust
fn last_name(self: &Self) -> String
```

Gets the last name.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L124)

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

### set_last_name

```rust
fn set_last_name(self: &Self, value: impl Into<String>)
```

Sets the last name.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L129)

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

### display_name_override

```rust
fn display_name_override(self: &Self) -> String
```

Gets the display name override.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L134)

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

### set_display_name_override

```rust
fn set_display_name_override(self: &Self, value: impl Into<String>)
```

Sets the display name override.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L139)

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

### display_name

```rust
fn display_name(self: &Self) -> String
```

Gets the display name: the override, or the first and the last names joined by a space.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L144)

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

### small_display_picture

```rust
fn small_display_picture(self: &Self) -> Option<Rc<dyn IImageBrushSource>>
```

Gets the small display picture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L153)

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

### set_small_display_picture

```rust
fn set_small_display_picture(self: &Self, value: Option<Rc<dyn IImageBrushSource>>)
```

Sets the small display picture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L158)

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

### large_display_picture

```rust
fn large_display_picture(self: &Self) -> Option<Rc<dyn IImageBrushSource>>
```

Gets the large display picture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L163)

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

### set_large_display_picture

```rust
fn set_large_display_picture(self: &Self, value: Option<Rc<dyn IImageBrushSource>>)
```

Sets the large display picture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L168)

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

### source_display_picture

```rust
fn source_display_picture(self: &Self) -> Option<Rc<dyn IImageBrushSource>>
```

Gets the source display picture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L173)

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

### set_source_display_picture

```rust
fn set_source_display_picture(self: &Self, value: Option<Rc<dyn IImageBrushSource>>)
```

Sets the source display picture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L178)

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

### thumbnail

```rust
fn thumbnail(self: &Self) -> Option<Rc<dyn IImageBrushSource>>
```

Gets the thumbnail.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L183)

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

### set_thumbnail

```rust
fn set_thumbnail(self: &Self, value: Option<Rc<dyn IImageBrushSource>>)
```

Sets the thumbnail.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/contact.rs#L188)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<Contact>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)

## Availability

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