Skip to main content

AppConfig

Struct AppConfig 

Source
pub struct AppConfig {
Show 36 fields pub theme: AppTheme, pub thumbnail_size: u32, pub face_detection_confidence: f32, pub face_clustering_threshold: f32, pub burst_time_window_seconds: i64, pub trash_auto_delete_days: u32, pub scan_hidden_folders: bool, pub show_timeline_stacks: bool, pub date_format: DateFormat, pub remembered_drives: Vec<PathBuf>, pub window_width: u32, pub window_height: u32, pub window_maximized: bool, pub sidebar_collapsed: bool, pub map_cache_limit_mb: u32, pub weight_cooccurrence: f32, pub weight_temporal: f32, pub memories_enabled: bool, pub home_city_override: Option<String>, pub last_view: Option<String>, pub auto_update_check_enabled: bool, pub last_update_check_at_unix: Option<i64>, pub show_first_run_update_prompt: bool, pub date_logic_version: u32, pub geonames_warning_seen: bool, pub thumbnail_cache_gb: f64, pub face_gpu_bridge_url: Option<String>, pub face_gpu_bridge_enabled: bool, pub config_version: u32, pub face_embedder_model: String, pub assistant_enabled: bool, pub ai_features_enabled: bool, pub assistant_provider: String, pub assistant_base_url: String, pub assistant_model: String, pub assistant_api_key: Option<String>,
}
Expand description

Application settings.

Fields§

§theme: AppTheme§thumbnail_size: u32§face_detection_confidence: f32§face_clustering_threshold: f32§burst_time_window_seconds: i64§trash_auto_delete_days: u32§scan_hidden_folders: bool§show_timeline_stacks: bool§date_format: DateFormat§remembered_drives: Vec<PathBuf>§window_width: u32§window_height: u32§window_maximized: bool

Whether the user’s window was maximised when they last closed the app. Restored at startup by the Tauri shell.

§sidebar_collapsed: bool§map_cache_limit_mb: u32§weight_cooccurrence: f32

Weight applied to co-occurrence prior when multiple candidate clusters exist for an unassigned face. 0 disables the signal.

§weight_temporal: f32

Weight applied to temporal-neighbor prior (±60 s, same cluster).

§memories_enabled: bool

Whether the Memories feature (N years ago today, seasonal recaps) is on.

§home_city_override: Option<String>

Optional user-specified home city for album suggestions. When set, the suggestion engine skips auto-detection of the home city.

§last_view: Option<String>

Last-viewed top-level view; restored on app launch. Stored as a string for forward compatibility across View enum changes.

§auto_update_check_enabled: bool

Opt-in: whether Smriti should query GitHub Releases once every 24 hours to see if a new version is available. Off by default — the first-run prompt flips it on if the user agrees. See PRIVACY.md.

§last_update_check_at_unix: Option<i64>

Unix timestamp of the last update check. Used to rate-limit the background subscription to at most one check per 24 h.

§show_first_run_update_prompt: bool

True until the user accepts or declines the first-run update prompt. After that, toggling is done through Settings.

§date_logic_version: u32

Version of the EXIF date-extraction logic the user’s library was last evaluated against. When the binary’s CURRENT_DATE_LOGIC_VERSION is higher, the app auto-runs RefreshPhotoDates once on first launch with the upgraded binary so users don’t keep seeing 2012 ghosts on photos shot in 2026 etc. After the refresh runs, this field is bumped to the new version.

§geonames_warning_seen: bool

True once the user has been shown the “Place names off — run scripts/setup_assets.sh” toast. Prevents the same toast appearing on every drive-select.

§thumbnail_cache_gb: f64

Disk budget for the on-drive thumbnail cache, expressed in gigabytes. Drives the LRU eviction in ThumbnailService. Default 5 GB suits a mid-size phone library; small-disk users can dial down, big-library users up.

§face_gpu_bridge_url: Option<String>

Optional GPU bridge URL for face embedding (opt-in).

§face_gpu_bridge_enabled: bool

Whether the GPU bridge is explicitly enabled by the user.

§config_version: u32

Version of config migrations applied. Bumped each time a default changes and existing installs need a one-time pick-up.

§face_embedder_model: String

Face embedding model filename (relative to the models directory). AdaFace is the only supported local recognizer.

§assistant_enabled: bool

Enables the album-only in-app Assistant. Semantic search remains available when this is off.

§ai_features_enabled: bool

Top-level opt-in for provider-backed AI features. Local semantic search is not gated by this.

§assistant_provider: String

Assistant provider identifier. local keeps the deterministic album-only harness; openai_compatible enables the saved endpoint configuration for a provider-backed assistant turn.

§assistant_base_url: String

OpenAI-compatible chat completions base URL.

§assistant_model: String

Provider model name.

§assistant_api_key: Option<String>

Provider API key. DTOs only expose whether this is set.

Implementations§

Source§

impl AppConfig

Source

pub fn load() -> Self

Load config from disk. Falls back to defaults on any failure.

Source

pub fn validate(&mut self)

Clamp all values to valid ranges.

Source

pub fn save(&self) -> Result<()>

Save config to disk.

Source

pub fn config_path() -> PathBuf

Config file path.

Source

pub fn remember_drive(&mut self, path: PathBuf)

Add drive to remembered list.

Trait Implementations§

Source§

impl Clone for AppConfig

Source§

fn clone(&self) -> AppConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AppConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AppConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for AppConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AppConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,