pub struct Settings {Show 18 fields
pub schema_version: u32,
pub download_dir: Option<PathBuf>,
pub transfer_concurrency: u32,
pub cache_ttl_secs: u64,
pub cache_size_cap_mb: u64,
pub preview_size_limit_mb: u64,
pub default_view_mode: String,
pub notifications: NotificationSettings,
pub fallback_threshold_mb: u64,
pub transfer_confirmations: TransferConfirmations,
pub s3_compatible_endpoints: Vec<S3CompatibleEndpoint>,
pub auto_update: AutoUpdateSettings,
pub diagnostics_enabled: bool,
pub startup_behavior: StartupBehavior,
pub proxy: ProxyMode,
pub theme: String,
pub keyboard_shortcuts: BTreeMap<String, String>,
pub unknown: BTreeMap<String, Value>,
}Expand description
All application settings, versioned and forward-compatible.
Defaults are in defaults.rs; this struct must never hard-code a default
inline — use Settings::default() as the canonical factory.
Fields§
§schema_version: u32Schema version; currently always 1.
download_dir: Option<PathBuf>Default download directory. None means “resolve from
tauri::api::path::download_dir() at runtime”.
transfer_concurrency: u32Maximum number of concurrent S3 object transfers.
cache_ttl_secs: u64Listing cache TTL in seconds.
cache_size_cap_mb: u64Maximum in-memory cache size in MiB.
preview_size_limit_mb: u64Files larger than this (MiB) show a warning before preview.
default_view_mode: StringDefault view mode: "Details", "Icons", "Gallery", "Tree",
"FlatKey", "Column", or "DualPane".
notifications: NotificationSettings§fallback_threshold_mb: u64Objects up to this size (MiB) auto-fall back on cross-account ops; larger objects require confirmation.
transfer_confirmations: TransferConfirmations§s3_compatible_endpoints: Vec<S3CompatibleEndpoint>§auto_update: AutoUpdateSettings§diagnostics_enabled: boolEnable local log/exception collection. Collection is always user-initiated; nothing is ever auto-uploaded.
startup_behavior: StartupBehavior§proxy: ProxyMode§theme: String"light", "dark", or "system".
keyboard_shortcuts: BTreeMap<String, String>Sparse map of user-overridden shortcuts. Keys are action identifiers
(e.g. "navigate.up"); values are key-combo strings (e.g. "Alt+Up").
The frontend baseline shortcut map is canonical and is NOT stored here;
only user overrides are persisted (per Decision D3).
unknown: BTreeMap<String, Value>Absorbs any JSON keys not known to this schema version. Round-tripped verbatim on save so future-app settings survive a downgrade.
Implementations§
Source§impl Settings
impl Settings
Sourcepub async fn load(path: &Path) -> Result<Self, AppError>
pub async fn load(path: &Path) -> Result<Self, AppError>
Load settings from path.
Returns Settings::default() when the file does not exist.
Returns an AppError::Internal if the file exists but cannot be read
or parsed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more