pub struct AutostartEntry {
pub id: String,
pub display_name: String,
pub description: Option<String>,
pub command: String,
pub icon: Option<String>,
pub enabled: bool,
pub source: String,
pub scope: Scope,
}Expand description
A single autostart item, normalized across providers.
id is stable and unique within a provider; pair it with AutostartEntry::source
(the provider id) to address an entry unambiguously across the whole registry.
use runlatch_core::{AutostartEntry, Scope};
let entry = AutostartEntry {
id: "redshift".into(),
display_name: "Redshift".into(),
description: None,
command: "redshift-gtk".into(),
icon: None,
enabled: true,
source: "xdg-autostart".into(),
scope: Scope::User,
};
assert_eq!(format!("{}:{}", entry.source, entry.id), "xdg-autostart:redshift");Fields§
§id: StringStable, unique within a provider (e.g. a .desktop file stem or a unit name).
display_name: StringHuman-readable name for display.
description: Option<String>Optional longer description.
command: StringThe command that runs at startup.
icon: Option<String>Optional icon name or path.
enabled: boolWhether the entry is currently enabled.
source: StringThe id of the provider that produced this entry, e.g. "systemd-user".
scope: ScopeWhether the entry is user- or system-scoped.
Trait Implementations§
Source§impl Clone for AutostartEntry
impl Clone for AutostartEntry
Source§fn clone(&self) -> AutostartEntry
fn clone(&self) -> AutostartEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AutostartEntry
impl Debug for AutostartEntry
Auto Trait Implementations§
impl Freeze for AutostartEntry
impl RefUnwindSafe for AutostartEntry
impl Send for AutostartEntry
impl Sync for AutostartEntry
impl Unpin for AutostartEntry
impl UnsafeUnpin for AutostartEntry
impl UnwindSafe for AutostartEntry
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
Mutably borrows from an owned value. Read more