# IAddChild

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/metadata/trait-iaddchild/

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

```rust
trait IAddChild<T>
```

Defines a method for adding a child of type `T` to an object: what markup
calls for each child element of an element whose type implements it.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/i_add_child.rs#L5)

## Members

- [`add_child`](#function-add_child)
- [`reference_id`](#function-reference_id)

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

### add_child

```rust
fn add_child(self: &Self, child: T)
```

Adds a child.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/i_add_child.rs#L7)

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

### reference_id

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

Identifies the object children are added to. Handles are equal when
they add to the same object; an adapter that implements the contract
for an object behind a class handle returns the address of that
object, so that two handles made from the same object are equal.

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

## Availability

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