# ItemsSourceViewOf

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

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

```rust
struct ItemsSourceViewOf<T: PropertyValue>
```

A typed [`ItemsSourceView`](/docs/0.5.0/api/ferroui-controls/struct-itemssourceview/): the items are read as `T`.

With `T` = `BoxedValue` the items are read untyped.

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

## Members

- [`empty`](#function-empty)
- [`new`](#function-new)
- [`from_view`](#function-from_view)
- [`view`](#function-view)
- [`get_at`](#function-get_at)
- [`iter`](#function-iter)

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

### empty

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

Gets an empty view.

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

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

### new

```rust
fn new(source: ItemsSource) -> Self
```

Initializes a new instance of the view for the specified data source.

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

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

### from_view

```rust
fn from_view(view: &ItemsSourceView) -> Self
```

Reads an existing view as a typed view over the same source.

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

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

### view

```rust
fn view(self: &Self) -> &Rc<ItemsSourceView>
```

The untyped view.

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

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

### get_at

```rust
fn get_at(self: &Self, index: usize) -> Option<T>
```

Retrieves the item at the specified index: `None` for a null item.
Panics if the index is out of range or the item is not a `T`.

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

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

### iter

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

The items, enumerated by index over the live collection.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Deref`

## Availability

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