# ResolverMixins

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-splat/service_location/trait-resolvermixins/

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

```rust
trait ResolverMixins: IMutableDependencyResolver
```

Registrations that return the resolver (`ResolverMixins`).

`TService : new()` is `S: Default`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L14)

## Members

- [`register_and`](#function-register_and)
- [`register_and_with_contract`](#function-register_and_with_contract)
- [`register_and_factory`](#function-register_and_factory)
- [`register_and_factory_with_contract`](#function-register_and_factory_with_contract)
- [`register_constant_and`](#function-register_constant_and)
- [`register_constant_and_with_contract`](#function-register_constant_and_with_contract)
- [`register_constant_and_value`](#function-register_constant_and_value)
- [`register_constant_and_value_with_contract`](#function-register_constant_and_value_with_contract)
- [`register_lazy_singleton_and`](#function-register_lazy_singleton_and)
- [`register_lazy_singleton_and_with_contract`](#function-register_lazy_singleton_and_with_contract)
- [`register_lazy_singleton_and_factory`](#function-register_lazy_singleton_and_factory)
- [`register_lazy_singleton_and_factory_with_contract`](#function-register_lazy_singleton_and_factory_with_contract)

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

### register_and

```rust
fn register_and<S: Default + 'static>(self: &Self) -> &Self
```

`RegisterAnd<TService>()`: a new `S` per resolution.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L16)

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

### register_and_with_contract

```rust
fn register_and_with_contract<S: Default + 'static>(self: &Self, contract: &str) -> &Self
```

`RegisterAnd<TService>(string contract)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L22)

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

### register_and_factory

```rust
fn register_and_factory<S: ?Sized + 'static>(self: &Self, factory: impl Fn() -> Rc<S> + 'static) -> &Self
```

`RegisterAnd<TService>(Func<TService>)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L28)

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

### register_and_factory_with_contract

```rust
fn register_and_factory_with_contract<S: ?Sized + 'static>(self: &Self, factory: impl Fn() -> Rc<S> + 'static, contract: &str) -> &Self
```

`RegisterAnd<TService>(Func<TService>, string contract)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L34)

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

### register_constant_and

```rust
fn register_constant_and<S: Default + 'static>(self: &Self) -> &Self
```

`RegisterConstantAnd<TService>()`: one new `S`, registered as a factory that returns it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L44)

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

### register_constant_and_with_contract

```rust
fn register_constant_and_with_contract<S: Default + 'static>(self: &Self, contract: &str) -> &Self
```

`RegisterConstantAnd<TService>(string contract)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L50)

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

### register_constant_and_value

```rust
fn register_constant_and_value<S: ?Sized + 'static>(self: &Self, value: Rc<S>) -> &Self
```

`RegisterConstantAnd<TService>(TService value)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L56)

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

### register_constant_and_value_with_contract

```rust
fn register_constant_and_value_with_contract<S: ?Sized + 'static>(self: &Self, value: Rc<S>, contract: &str) -> &Self
```

`RegisterConstantAnd<TService>(TService value, string contract)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L61)

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

### register_lazy_singleton_and

```rust
fn register_lazy_singleton_and<S: Default + 'static>(self: &Self) -> &Self
```

`RegisterLazySingletonAnd<TService>()`: one `S`, created on the first resolution.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L66)

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

### register_lazy_singleton_and_with_contract

```rust
fn register_lazy_singleton_and_with_contract<S: Default + 'static>(self: &Self, contract: &str) -> &Self
```

`RegisterLazySingletonAnd<TService>(string contract)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L73)

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

### register_lazy_singleton_and_factory

```rust
fn register_lazy_singleton_and_factory<S: ?Sized + 'static>(self: &Self, factory: impl Fn() -> Rc<S> + 'static) -> &Self
```

`RegisterLazySingletonAnd<TService>(Func<TService>)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L83)

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

### register_lazy_singleton_and_factory_with_contract

```rust
fn register_lazy_singleton_and_factory_with_contract<S: ?Sized + 'static>(self: &Self, factory: impl Fn() -> Rc<S> + 'static, contract: &str) -> &Self
```

`RegisterLazySingletonAnd<TService>(Func<TService>, string contract)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/resolver_mixins.rs#L93)

## Trait implementations

- [`ResolverMixins`](/docs/0.5.0/api/ferroui-splat/service_location/trait-resolvermixins/)

## Availability

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