pub struct AppSettings {
pub launch_at_login: bool,
pub check_for_updates: bool,
pub update_prompt_seen: bool,
pub show_in_menu_bar: bool,
pub language: Option<String>,
}Expand description
App-wide preferences not tied to any particular device.
All fields are #[serde(default)] so adding a new one is backward
compatible — old config files just keep the default for the new field.
Fields§
§launch_at_login: boolWhen true, a macOS LaunchAgent plist at
~/Library/LaunchAgents/org.openlogi.openlogi.plist is installed
so the app starts on login (P2.2). The plist is reconciled with
this field on every startup; flipping the flag and relaunching is
enough to install / remove it.
check_for_updates: boolOpt-in update check (P2.8). Off by default to honour the
README’s “no telemetry, no auto-update poller” promise. When true,
the app makes exactly one HEAD /repos/AprilNEA/OpenLogi/releases/ latest request per launch and logs whether a newer version is
available — no automatic download.
update_prompt_seen: boolTrue once the first-run “check for updates?” prompt has been answered
(either way), so it is never shown again. The prompt is how a
privacy-conscious default of check_for_updates = false still lets a
user opt in on first launch.
Whether OpenLogi shows a macOS menu-bar (status item) icon. true
(default) → it lives in the menu bar, dropping the Dock icon while no
window is open; false → it stays an ordinary Dock app with no status
item. macOS-only; ignored on other platforms.
language: Option<String>UI language as a BCP-47-ish locale code matching the GUI’s bundled
locales ("en", "ja", "ru", "zh-CN", "zh-HK"). None
means “follow the system locale”, which the GUI resolves at startup.
Stored here so a user’s explicit choice survives restarts regardless of
the OS setting.
Implementations§
Source§impl AppSettings
impl AppSettings
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
skip_serializing_if helper: true when nothing diverges from the
default, so empty settings don’t clutter config.toml.
Trait Implementations§
Source§impl Clone for AppSettings
impl Clone for AppSettings
Source§fn clone(&self) -> AppSettings
fn clone(&self) -> AppSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AppSettings
impl Debug for AppSettings
Source§impl Default for AppSettings
impl Default for AppSettings
Source§impl<'de> Deserialize<'de> for AppSettings
impl<'de> Deserialize<'de> for AppSettings
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>,
Source§impl PartialEq for AppSettings
impl PartialEq for AppSettings
Source§fn eq(&self, other: &AppSettings) -> bool
fn eq(&self, other: &AppSettings) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AppSettings
impl Serialize for AppSettings
impl Eq for AppSettings
impl StructuralPartialEq for AppSettings
Auto Trait Implementations§
impl Freeze for AppSettings
impl RefUnwindSafe for AppSettings
impl Send for AppSettings
impl Sync for AppSettings
impl Unpin for AppSettings
impl UnsafeUnpin for AppSettings
impl UnwindSafe for AppSettings
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.