# ObservableLocalizedString

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-protranslate-core/struct-observablelocalizedstring/

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

```rust
struct ObservableLocalizedString
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L440)

## Members

- [`key`](#function-key)
- [`value`](#function-value)
- [`snapshot`](#function-snapshot)
- [`localized_string`](#function-localized_string)
- [`culture`](#function-culture)
- [`set_arguments`](#function-set_arguments)
- [`update_arguments`](#function-update_arguments)
- [`dispose`](#function-dispose)
- [`is_disposed`](#function-is_disposed)
- [`refresh`](#function-refresh)
- [`subscribe`](#function-subscribe)
- [`subscribe_snapshot`](#function-subscribe_snapshot)

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

### key

```rust
fn key(self: &Self) -> &str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L468)

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

### value

```rust
fn value(self: &Self) -> Result<String, TranslationError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L471)

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

### snapshot

```rust
fn snapshot(self: &Self) -> ObservableLocalizedSnapshot
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L474)

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

### localized_string

```rust
fn localized_string(self: &Self) -> Result<LocalizedString, TranslationError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L477)

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

### culture

```rust
fn culture(self: &Self) -> Result<Culture, TranslationError>
```

The culture that supplied the resolved resource, which can be a parent
or fallback culture rather than the currently requested UI culture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L482)

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

### set_arguments

```rust
fn set_arguments(self: &Self, arguments: Vec<FormatArgument>)
```

Update arguments, preserving the source proxy's notification semantics
even when the formatted text remains equal.
## Panics
Panics after disposal. `update_arguments` exposes a recoverable error.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L490)

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

### update_arguments

```rust
fn update_arguments(self: &Self, arguments: Vec<FormatArgument>) -> Result<(), TranslationError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L494)

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

### dispose

```rust
fn dispose(self: &Self)
```

Disconnect all clones of this observation while retaining its last
snapshot. Dropping the final clone also disconnects automatically.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L504)

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

### is_disposed

```rust
fn is_disposed(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L510)

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

### refresh

```rust
fn refresh(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L513)

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

### subscribe

```rust
fn subscribe(self: &Self, callback: impl Fn(&Result<String, TranslationError>) -> () + 'static) -> Subscription
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L550)

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

### subscribe_snapshot

```rust
fn subscribe_snapshot(self: &Self, callback: impl Fn(&ObservableLocalizedSnapshot) -> () + 'static) -> Subscription
```

Observe metadata and value together. Refreshes notify even if only the
resolved culture, provider, diagnostics, or formatting culture changed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/service.rs#L560)

## Trait implementations

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

## Availability

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