# Container

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/styling/struct-container/

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

```rust
struct Container
```

Provides container attached properties: a layoutable that is a container
publishes its size to the container queries of its descendants.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L7)

## Members

- [`TYPE`](#assoc_const-type)
- [`name_property`](#function-name_property)
- [`sizing_property`](#function-sizing_property)
- [`get_name`](#function-get_name)
- [`set_name`](#function-set_name)
- [`get_sizing`](#function-get_sizing)
- [`set_sizing`](#function-set_sizing)
- [`set_query_provider_size`](#function-set_query_provider_size)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L9)

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

### name_property

```rust
fn name_property() -> &'static AttachedProperty<Option<String>>
```

Defines the Name attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L11)

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

### sizing_property

```rust
fn sizing_property() -> &'static AttachedProperty<ContainerSizing>
```

Defines the Sizing attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L11)

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

### get_name

```rust
fn get_name(layoutable: &Layoutable) -> Option<String>
```

Gets the name of the container.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L53)

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

### set_name

```rust
fn set_name(layoutable: &Layoutable, name: Option<String>)
```

Sets the name of the container.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L58)

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

### get_sizing

```rust
fn get_sizing(layoutable: &Layoutable) -> ContainerSizing
```

Gets the container sizing behavior.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L63)

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

### set_sizing

```rust
fn set_sizing(layoutable: &Layoutable, sizing: ContainerSizing)
```

Sets the container sizing behavior.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L68)

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

### set_query_provider_size

```rust
fn set_query_provider_size(layoutable: &Layoutable, width: f64, height: f64, sizing: ContainerSizing)
```

Reports the size of a container to its query provider, if it has
one. For layoutables that replace the core measure pass (the roots
of windows), which reports the size otherwise.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/container.rs#L80)

## 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`
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)

## Availability

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