# GradientStops

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

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

```rust
struct GradientStops
```

A collection of [`GradientStop`](/docs/0.5.0/api/ferroui-base/media/struct-gradientstop/)s.

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

## Members

- [`new`](#function-new)
- [`from_items`](#function-from_items)
- [`to_immutable`](#function-to_immutable)

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

### new

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

Creates an empty collection.

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

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

### from_items

```rust
fn from_items(items: impl IntoIterator<Item = Ref<GradientStop>>) -> Self
```

Creates a collection holding `items`.

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

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

### to_immutable

```rust
fn to_immutable(self: &Self) -> Vec<ImmutableGradientStop>
```

Creates an immutable copy of the gradient stops.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `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`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `StructuralPartialEq`
- `PartialEq`
- `Deref`
- `Default`
- `FromIterator<Ref<GradientStop>>`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- [`ValueTypeRegistration`](/docs/0.5.0/api/ferroui-base/data/core/trait-valuetyperegistration/)

## Availability

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