pub struct ForeignService {
pub directories: ServiceDirectories,
pub root: PathBuf,
pub owner: Option<String>,
pub this_account: Option<String>,
pub local_root: PathBuf,
pub local_record: PathBuf,
pub unused_local_record: Option<InstallRecord>,
pub unreadable: Option<String>,
}Expand description
A registration whose command line names application-data directories that are not this account’s: another installation’s service.
Every account on a machine sees the one registration its service manager
holds under the product’s name. A second account – one that ran a
login-mode install once, say – has an install record and a database of its
own, and comparing them against the other installation’s registration used
to report a stale binary, a mismatched start mode and a secret store in the
wrong scope, with service uninstall, service install and auth login
as the remedies. Followed from that account, each of them breaks or
replaces a service that is healthy. So the registration is reported as the
other installation’s, with what can be read of it, and this account’s own
record as the unused configuration it is.
Fields§
§directories: ServiceDirectoriesThe directories its command line names.
root: PathBufThe data root they sit under. See ServiceDirectories::root.
owner: Option<String>The account that data root belongs to, when its path says.
this_account: Option<String>How a command run by this account reaches the installation, when it is
this account’s own under other directories – an install made with
--data-dir, seen from a command run without it, or the other way
round. None for another account’s.
local_root: PathBufThis account’s own data root, which no registration runs against.
local_record: PathBufWhere this account’s own install record is, or would be.
unused_local_record: Option<InstallRecord>This account’s own install record, from an earlier install.
unreadable: Option<String>Why the service’s own records could not be read, or None when they
were and the status describes them.
Implementations§
Source§impl ForeignService
impl ForeignService
Sourcepub fn where_to_look(&self) -> String
pub fn where_to_look(&self) -> String
How to see the service’s own details: as its owner, or elevated.
Sourcepub fn act_as(&self) -> String
pub fn act_as(&self) -> String
Where a change to the service has to be made from: the installation’s own account, because every remedy a command prints acts on the directories of whoever runs it. Elevation alone reads the service’s records but is still this account.
Sourcepub const fn is_unread(&self) -> bool
pub const fn is_unread(&self) -> bool
Whether the service’s own records could not be read, so only what the service manager says is known.
Sourcepub fn installed_by(&self) -> String
pub fn installed_by(&self) -> String
Who installed it, for a sentence.
Sourcepub fn unused_local_note(&self) -> Option<String>
pub fn unused_local_note(&self) -> Option<String>
The note describing this account’s own record, when there is one.