# PooledInlineList

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/utilities/struct-pooledinlinelist/

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

```rust
struct PooledInlineList<T: ?Sized>
```

A list of shared items that holds one item in place and more in a list.

Items are compared by reference, as in the original, whose items are
reference types. The original rents the array of the list from the shared
array pool; here the list owns a `Vec`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L8)

## Members

- [`new`](#function-new)
- [`from_raw_state`](#function-from_raw_state)
- [`add`](#function-add)
- [`remove`](#function-remove)
- [`ensure_capacity`](#function-ensure_capacity)
- [`dispose`](#function-dispose)
- [`count`](#function-count)
- [`get_enumerator`](#function-get_enumerator)
- [`transfer_raw_state`](#function-transfer_raw_state)

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

### new

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L30)

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

### from_raw_state

```rust
fn from_raw_state(raw_state: PooledInlineListRawState<T>) -> Self
```

For compositor serialization purposes only, takes the ownership of previously transferred state

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L35)

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

### add

```rust
fn add(self: &mut Self, item: Rc<T>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L39)

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

### remove

```rust
fn remove(self: &mut Self, item: &Rc<T>) -> bool
```

Removes the item when it is the one the list holds in place.

As in the original, which tests the argument rather than its own
state for being a list, an item of a list of several is not removed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L54)

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

### ensure_capacity

```rust
fn ensure_capacity(self: &mut Self, count: i32)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L75)

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

### dispose

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L85)

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

### count

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L92)

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

### get_enumerator

```rust
fn get_enumerator(self: &Self) -> PooledInlineListEnumerator<'_, T>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L100)

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

### transfer_raw_state

```rust
fn transfer_raw_state(self: &mut Self) -> PooledInlineListRawState<T>
```

For compositor serialization purposes only, gives up the ownership of the internal state and returns it

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/pooled_inline_list.rs#L105)

## 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`
- `Default`
- `IntoIterator`

## Availability

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