# SettingsService

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

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

```rust
struct SettingsService
```



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

## Members

- [`new`](#function-new)
- [`path`](#function-path)
- [`load`](#function-load)
- [`load_or_default`](#function-load_or_default)
- [`save`](#function-save)
- [`save_with_credentials`](#function-save_with_credentials)

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

### new

```rust
fn new(storage: Rc<dyn StudioStorage>, path: impl Into<String>) -> Self
```



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

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

### path

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



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

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

### load

```rust
fn load(self: &Self) -> Result<Option<StudioSettings>, StudioError>
```



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

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

### load_or_default

```rust
fn load_or_default(self: &Self) -> SettingsLoad
```

Corrupt settings are preserved and surfaced alongside usable defaults.

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

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

### save

```rust
fn save(self: &Self, settings: &StudioSettings) -> Result<(), StudioError>
```



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

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

### save_with_credentials

```rust
fn save_with_credentials(self: &Self, settings: &StudioSettings, credentials: CredentialPersistence) -> Result<(), StudioError>
```



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

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