# SettingsEditor

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-protranslate-studio/struct-settingseditor/

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

```rust
struct SettingsEditor
```

Editing settings is transactional: cancelling discards the draft, and a
failed save keeps it available without changing the original configuration.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/settings.rs#L133)

## Members

- [`new`](#function-new)
- [`draft`](#function-draft)
- [`draft_mut`](#function-draft_mut)
- [`cancel`](#function-cancel)
- [`save`](#function-save)

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

### new

```rust
fn new(settings: StudioSettings) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/settings.rs#L138)

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

### draft

```rust
fn draft(self: &Self) -> &StudioSettings
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/settings.rs#L144)

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

### draft_mut

```rust
fn draft_mut(self: &mut Self) -> &mut StudioSettings
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/settings.rs#L147)

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

### cancel

```rust
fn cancel(self: Self) -> StudioSettings
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/settings.rs#L150)

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

### save

```rust
fn save(self: &mut Self, service: &SettingsService, credentials: CredentialPersistence) -> Result<StudioSettings, StudioError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/settings.rs#L153)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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/).
