# ObjectFactory

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

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

```rust
struct ObjectFactory<S: ?Sized>
```



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

## Members

- [`new`](#function-new)

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

### new

```rust
fn new(dependencies: Vec<Dependency>, factory: impl Fn(&dyn IServiceProvider, Option<&ServiceKey>) -> ServiceResult<Rc<S>> + 'static) -> Self
```



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

## Trait implementations

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

## Availability

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