# VisualUnorderedCollection

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/struct-visualunorderedcollection/

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

```rust
struct VisualUnorderedCollection
```

A set of visuals (WinUI
`Microsoft.UI.Composition.VisualUnorderedCollection`): the targets or the
exclusions of a light.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L39)

## Members

- [`items`](#function-items)
- [`add`](#function-add)
- [`remove`](#function-remove)
- [`remove_all`](#function-remove_all)
- [`count`](#function-count)
- [`contains`](#function-contains)
- [`is_disposed`](#function-is_disposed)
- [`dispose`](#function-dispose)

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

### items

```rust
fn items(self: &Self) -> Vec<Rc<CompositionVisual>>
```

A snapshot of the visuals, for enumeration (in the order they were
added, which has no meaning).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L65)

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

### add

```rust
fn add(self: &Self, visual: Rc<CompositionVisual>)
```

`Add`: adds a visual; a visual that is in the collection already is
not added again.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L71)

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

### remove

```rust
fn remove(self: &Self, visual: &Rc<CompositionVisual>) -> bool
```

`Remove`: removes a visual; `false` when it was not in the
collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L79)

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

### remove_all

```rust
fn remove_all(self: &Self)
```

`RemoveAll`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L84)

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

### count

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

`Count`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L89)

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

### contains

```rust
fn contains(self: &Self, visual: &Rc<CompositionVisual>) -> bool
```

Whether the visual is in the collection (compared by reference).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L94)

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

### is_disposed

```rust
fn is_disposed(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L98)

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

### dispose

```rust
fn dispose(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_light.rs#L102)

## 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`
- `VisualUnorderedCollectionHooks<CompositionVisual>`
- `IRegisterForSerialization`
- `ICompositionObjectHost`
- [`ICompositionObjectAnimations`](/docs/0.5.0/api/ferroui-base/rendering/composition/trait-icompositionobjectanimations/)
- [`AsCompositionObject`](/docs/0.5.0/api/ferroui-base/rendering/composition/trait-ascompositionobject/)
- `ICompositionObject`
- `ICompositorSerializable`

## Availability

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