Skip to main content

Module recorder_settings

Module recorder_settings 

Source
Expand description

Persistent recorder preferences (M-SAVE.0) — JSON at <app-config-dir>/recorder-settings.json.

  • output_dir — the directory new recordings export into. None → the per-OS default (recording_paths::default_output_dir).
  • last_format — the export format slug last chosen in the Save panel ("mp4-h264" / "webm-vp9"). None → the default format.

Both fields are #[serde(default)] + Option, so partial / older files still load (missing keys → None).

Structs§

RecorderSettings
Cross-session recorder preferences. See module docs for the per-field semantics.

Constants§

SETTINGS_FILE 🔒
File name under the app-config dir. See module docs.

Functions§

load
Load the persisted settings for this app handle. Defaults on any failure (see load_from).
load_from
Parse settings from the JSON at path, falling back to RecorderSettings::default on any failure (missing / unreadable / malformed) — a corrupt file degrades to defaults, never blocks.
resolved_output_dir
The directory new recordings should export into: the persisted override if set, otherwise the per-OS default. This is the single resolver every output-path computation should call so the chosen directory is honored everywhere.
save
Persist settings for this app handle.
save_to
Serialize settings to the JSON at path, creating the parent directory if needed.
settings_path 🔒
Resolve the settings-file path under Tauri’s app-config dir. None if the platform path resolver fails (extremely rare — missing $HOME with no fallback).