# Locator

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-splat/service_location/struct-locator/

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

```rust
struct Locator
```

The service locator of Splat (`Locator`): [`AppLocator`](/docs/0.5.0/api/ferroui-splat/service_location/struct-applocator/), whose resolver initializer
registers the default services of Splat ([`initialize_splat`](/docs/0.5.0/api/ferroui-splat/service_location/function-initialize_splat/)) on every resolver set
afterwards.

Upstream sets the initializer in the static constructor of the class, the first time it is
used; here the first call of any function of `Locator` on the thread sets it.

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

## Members

- [`current`](#function-current)
- [`current_mutable`](#function-current_mutable)
- [`set_locator`](#function-set_locator)
- [`get_locator`](#function-get_locator)
- [`register_resolver_callback_changed`](#function-register_resolver_callback_changed)
- [`suppress_resolver_callback_changed_notifications`](#function-suppress_resolver_callback_changed_notifications)
- [`are_resolver_callback_changed_notifications_enabled`](#function-are_resolver_callback_changed_notifications_enabled)

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

### current

```rust
fn current() -> Rc<dyn IReadonlyDependencyResolver>
```

`Current`.

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

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

### current_mutable

```rust
fn current_mutable() -> Rc<dyn IMutableDependencyResolver>
```

`CurrentMutable`.

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

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

### set_locator

```rust
fn set_locator(dependency_resolver: Rc<dyn IDependencyResolver>)
```

`SetLocator`.

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

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

### get_locator

```rust
fn get_locator() -> Rc<dyn IDependencyResolver>
```

`GetLocator`.

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

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

### register_resolver_callback_changed

```rust
fn register_resolver_callback_changed(callback: impl Fn() -> () + 'static) -> Rc<dyn IDisposable>
```

`RegisterResolverCallbackChanged`.

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

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

### suppress_resolver_callback_changed_notifications

```rust
fn suppress_resolver_callback_changed_notifications() -> Rc<dyn IDisposable>
```

`SuppressResolverCallbackChangedNotifications`.

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

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

### are_resolver_callback_changed_notifications_enabled

```rust
fn are_resolver_callback_changed_notifications_enabled() -> bool
```

`AreResolverCallbackChangedNotificationsEnabled`.

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

## 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/).
