# ItemWithValue

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dynamic-data/kernel/struct-itemwithvalue/

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

```rust
struct ItemWithValue<T, V>
```

An item and a value that goes with it (`ItemWithValue<TObject, TValue>`): equal when both
parts are.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/kernel/item_with_value.rs#L8)

## Members

- [`new`](#function-new)
- [`item`](#function-item)
- [`value`](#function-value)
- [`into_parts`](#function-into_parts)

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

### new

```rust
fn new(item: T, value: V) -> Self
```

The pair (`ItemWithValue(TObject, TValue)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/kernel/item_with_value.rs#L15)

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

### item

```rust
fn item(self: &Self) -> &T
```

The item (`Item`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/kernel/item_with_value.rs#L20)

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

### value

```rust
fn value(self: &Self) -> &V
```

The value (`Value`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/kernel/item_with_value.rs#L25)

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

### into_parts

```rust
fn into_parts(self: Self) -> (T, V)
```

The item and the value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/kernel/item_with_value.rs#L30)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- `Equivalent<K>`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `Display`

## Availability

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