# AutoSaveScheduler

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

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

```rust
struct AutoSaveScheduler
```

Host-driven scheduling: call `tick` from a UI timer or an executor. No worker
threads borrow a document, and failed saves remain due for the next tick.

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

## Members

- [`new`](#function-new)
- [`start`](#function-start)
- [`stop`](#function-stop)
- [`is_running`](#function-is_running)
- [`tick`](#function-tick)

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

### new

```rust
fn new(interval_seconds: u32) -> Result<Self, StudioError>
```



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

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

### start

```rust
fn start(self: &mut Self, now_millis: i64)
```



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

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

### stop

```rust
fn stop(self: &mut Self)
```



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

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

### is_running

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



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

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

### tick

```rust
fn tick(self: &mut Self, now_millis: i64, document: &StudioDocument, sessions: &SessionService) -> Result<bool, StudioError>
```



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

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