# ActivatorUtilities

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dependency-injection/struct-activatorutilities/

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

```rust
struct ActivatorUtilities
```

Creates unregistered instances from the same factories as registrations. Such instances
belong to the caller, not to a provider's disposal list. Explicit constructor arguments can
be captured by the factory; Rust checks their types and the selected constructor.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/activator_utilities.rs#L37)

## Members

- [`create_factory`](#function-create_factory)
- [`create_instance`](#function-create_instance)
- [`create_keyed_instance`](#function-create_keyed_instance)
- [`get_service_or_create_instance`](#function-get_service_or_create_instance)

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

### create_factory

```rust
fn create_factory<S: ?Sized + 'static>(factory: ObjectFactory<S>) -> ObjectFactory<S>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/activator_utilities.rs#L39)

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

### create_instance

```rust
fn create_instance<S: ?Sized + 'static>(provider: &dyn IServiceProvider, factory: &ObjectFactory<S>) -> ServiceResult<Rc<S>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/activator_utilities.rs#L42)

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

### create_keyed_instance

```rust
fn create_keyed_instance<S: ?Sized + 'static>(provider: &dyn IServiceProvider, key: Option<&ServiceKey>, factory: &ObjectFactory<S>) -> ServiceResult<Rc<S>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/activator_utilities.rs#L48)

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

### get_service_or_create_instance

```rust
fn get_service_or_create_instance<S: ?Sized + 'static>(provider: &dyn IServiceProvider, factory: &ObjectFactory<S>) -> ServiceResult<Rc<S>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/activator_utilities.rs#L56)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`

## Availability

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