# NameScopeLocator

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/controls/struct-namescopelocator/

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

```rust
struct NameScopeLocator
```

Tracks a named element in a name scope.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/controls/name_scope_locator.rs#L11)

## Members

- [`track`](#function-track)
- [`track_value`](#function-track_value)

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

### track

```rust
fn track(scope: &NameScopeRef, name: &str) -> Rc<dyn IObservable<Option<crate::Ref<crate::FerroObject>>>>
```

Tracks a named control relative to another control: the observable
produces the element once it is registered (or `None` once the scope
completes without it) and never completes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/controls/name_scope_locator.rs#L17)

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

### track_value

```rust
fn track_value(scope: &NameScopeRef, name: &str) -> Rc<dyn IObservable<Option<BoxedValue>>>
```

Tracks any named object, including a plain model, without completing the observable.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/controls/name_scope_locator.rs#L22)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`

## Availability

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