# InlineCollection

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

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

```rust
struct InlineCollection
```

A collection of [`Inline`](/docs/0.5.0/api/ferroui-controls/documents/struct-inline/)s.

The value is a shared handle: clones refer to the same collection, and
handles compare by identity.

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

## Members

- [`new`](#function-new)
- [`text`](#function-text)
- [`add`](#function-add)
- [`add_text`](#function-add_text)
- [`add_control`](#function-add_control)
- [`invalidated`](#function-invalidated)

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

### new

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

Initializes a new instance of the `InlineCollection` class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/inline_collection.rs#L48)

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

### text

```rust
fn text(self: &Self) -> Option<String>
```

Gets the text contained in this collection: the text of every inline,
or `None` when the collection is empty.

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

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

### add

```rust
fn add(self: &Self, inline: impl IntoRef<Inline>)
```

Adds an inline (of any class) to the collection.

The text of a hosting text block becomes the first run of the
collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/inline_collection.rs#L137)

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

### add_text

```rust
fn add_text(self: &Self, text: &str)
```

Adds a text inline to this collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/inline_collection.rs#L150)

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

### add_control

```rust
fn add_control(self: &Self, control: impl IntoRef<Control>)
```

Adds a control wrapped inside an `InlineUIContainer` to this
collection.

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

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

### invalidated

```rust
fn invalidated(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Raised when an inline in the collection changes.

Dropping the returned guard removes the handler; `Subscription::detach` keeps it for the
life of the collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/inline_collection.rs#L171)

## 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`
- [`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/)
- `ErasedDestructor`
- `IntoEither`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- [`ValueTypeRegistration`](/docs/0.5.0/api/ferroui-base/data/core/trait-valuetyperegistration/)
- `Clone`
- `PartialEq`
- `Debug`
- `Deref`

## Availability

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