# MutableDependencyResolverExt

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

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

```rust
trait MutableDependencyResolverExt: IMutableDependencyResolver
```

The generic forms of [`IMutableDependencyResolver`](/docs/0.5.0/api/ferroui-splat/service_location/trait-imutabledependencyresolver/).

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

## Members

- [`has_registration`](#function-has_registration)
- [`has_registration_with_contract`](#function-has_registration_with_contract)
- [`register`](#function-register)
- [`register_with_contract`](#function-register_with_contract)
- [`register_constant`](#function-register_constant)
- [`register_constant_with_contract`](#function-register_constant_with_contract)
- [`register_constant_disposable`](#function-register_constant_disposable)
- [`register_constant_disposable_with_contract`](#function-register_constant_disposable_with_contract)
- [`register_lazy_singleton`](#function-register_lazy_singleton)
- [`register_lazy_singleton_with_contract`](#function-register_lazy_singleton_with_contract)
- [`register_lazy_singleton_disposable`](#function-register_lazy_singleton_disposable)
- [`register_lazy_singleton_disposable_with_contract`](#function-register_lazy_singleton_disposable_with_contract)
- [`unregister_current`](#function-unregister_current)
- [`unregister_current_with_contract`](#function-unregister_current_with_contract)
- [`unregister_all`](#function-unregister_all)
- [`unregister_all_with_contract`](#function-unregister_all_with_contract)
- [`service_registration_callback`](#function-service_registration_callback)
- [`service_registration_callback_with_contract`](#function-service_registration_callback_with_contract)

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

### has_registration

```rust
fn has_registration<S: ?Sized + 'static>(self: &Self) -> bool
```

`HasRegistration<T>()`.

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

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

### has_registration_with_contract

```rust
fn has_registration_with_contract<S: ?Sized + 'static>(self: &Self, contract: Option<&str>) -> bool
```

`HasRegistration<T>(string? contract)`.

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

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

### register

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

`Register<T>(Func<T?>)`.

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

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

### register_with_contract

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

`Register<T>(Func<T?>, string? contract)`.

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

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

### register_constant

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

`RegisterConstant<T>(T)`.

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

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

### register_constant_with_contract

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

`RegisterConstant<T>(T, string? contract)`.

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

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

### register_constant_disposable

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

`RegisterConstant<T>(T)` of a constant that the resolver disposes when it is disposed.

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

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

### register_constant_disposable_with_contract

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

`RegisterConstant<T>(T, string? contract)` of a constant that the resolver disposes when it
is disposed.

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

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

### register_lazy_singleton

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

`RegisterLazySingleton<T>(Func<T?>)`.

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

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

### register_lazy_singleton_with_contract

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

`RegisterLazySingleton<T>(Func<T?>, string? contract)`.

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

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

### register_lazy_singleton_disposable

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

`RegisterLazySingleton<T>(Func<T?>)` of a singleton that the resolver disposes, once
created, when it is disposed.

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

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

### register_lazy_singleton_disposable_with_contract

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

`RegisterLazySingleton<T>(Func<T?>, string? contract)` of a singleton that the resolver
disposes, once created, when it is disposed.

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

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

### unregister_current

```rust
fn unregister_current<S: ?Sized + 'static>(self: &Self)
```

`UnregisterCurrent<T>()`.

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

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

### unregister_current_with_contract

```rust
fn unregister_current_with_contract<S: ?Sized + 'static>(self: &Self, contract: Option<&str>)
```

`UnregisterCurrent<T>(string? contract)`.

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

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

### unregister_all

```rust
fn unregister_all<S: ?Sized + 'static>(self: &Self)
```

`UnregisterAll<T>()`.

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

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

### unregister_all_with_contract

```rust
fn unregister_all_with_contract<S: ?Sized + 'static>(self: &Self, contract: Option<&str>)
```

`UnregisterAll<T>(string? contract)`.

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

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

### service_registration_callback

```rust
fn service_registration_callback<S: ?Sized + 'static>(self: &Self, callback: impl Fn(&dyn IDisposable) -> () + 'static) -> Rc<dyn IDisposable>
```

`ServiceRegistrationCallback<T>(Action<IDisposable>)`.

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

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

### service_registration_callback_with_contract

```rust
fn service_registration_callback_with_contract<S: ?Sized + 'static>(self: &Self, contract: Option<&str>, callback: impl Fn(&dyn IDisposable) -> () + 'static) -> Rc<dyn IDisposable>
```

`ServiceRegistrationCallback<T>(string? contract, Action<IDisposable>)`.

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

## Trait implementations

- [`MutableDependencyResolverExt`](/docs/0.5.0/api/ferroui-splat/service_location/trait-mutabledependencyresolverext/)

## Availability

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