pub struct LoginEntry { /* private fields */ }Expand description
The login entry that starts nibkeep-sync when the person logs in: the platform’s own,
where the person finds the programs that start with their session. Each computer has one
of its own, named as its folder of state is, so that a program that syncs dotfolders, or
a roaming profile, never makes one computer’s turning off remove another’s.
Implementations§
Source§impl LoginEntry
impl LoginEntry
Sourcepub fn platform() -> Option<Self>
pub fn platform() -> Option<Self>
This computer’s login entry: on Linux and the like, the autostart entry
~/.config/autostart/nibkeep-sync-COMPUTER.desktop, or in $XDG_CONFIG_HOME/autostart.
None where tests keep away from it.
Sourcepub fn state(&self) -> Result<EntryState, NodeError>
pub fn state(&self) -> Result<EntryState, NodeError>
Sourcepub fn make(&self, program: &Path) -> Result<EntryState, NodeError>
pub fn make(&self, program: &Path) -> Result<EntryState, NodeError>
Makes it start program: a new one, on, where there is none; otherwise the one
there, starting program instead, and still off if the person turned it off. Writes
nothing where it starts program already. Returns what it says then.
§Errors
Returns an error if it cannot be read or written.
Sourcepub fn point(&self, program: &Path) -> Result<EntryState, NodeError>
pub fn point(&self, program: &Path) -> Result<EntryState, NodeError>
Makes it start program instead, as LoginEntry::make does, if there is one: what
it says then. A program that names a newer copy does this, and never makes an entry
that the person removed.
§Errors
Returns an error if it cannot be read or written.