Expand description
The settings a process reads: the source its host installed.
The session installs its settings as resources of the workspace; a sandboxed app installs its
channel to the session; a service the session started, and a browser page, install a
HostDocument of what their host gives them; a window of the toolkit alone installs none.
A process with none installed reads every setting’s default.
Structs§
- Change
Origin - Change
Signal - Deferred
Failure - Host
Document - Settings
Stamp - One version of the document a
SettingsSourceholds, for readers that follow it. - Source
Scope
Enums§
Traits§
Functions§
- compare_
update_ section SettingsSource::compare_update_sectionsof one section: mergevaluesintonameonly if it still holdsexpected.- install_
source - Make
sourcethe settings document of this process, or restore the local profile withNone. A host does this once, as it starts; a test that needs a document of its own takes ascoped_source, which no other test sees. - installed_
source - installed_
version - The version of
sourceas this process reads it: the document’s own revision, told apart from every document installed in another’s place before it, so a reader that caches what it read by version reads a replaced document again even where the two number alike. A reader told only the document’s own revision takes a document put in place of another for the one it replaced, and keeps reading what the old one said. - keep_
profile - Keep the settings of the profile at
rootin whatsourcemakes, in place of its own document (profile), unless something keeps them already: what a host that keeps a person’s settings as resources of a workspace gives the profile it opens a window on, so they are kept, stepped and read back as that host keeps the person’s, and a later window on the profile finds what an earlier one set. - load_
section_ in - Section
nameof whatsourceholds, assection_of. - merge_
section - Merge
valuesinto sectionnameofdoc, keeping every other section and every keyvaluesdoes not mention. A section of the wrong type is replaced: there is nothing to preserve in a value that cannot be read. - parse
- A settings document’s body read as an object: anything else is the empty document, so a broken file reads as every setting’s default.
- profile
- The settings of a profile kept apart from the person’s (a headless app’s, a test’s, the
models a host keeps for a workspace it serves), by its root: one per root for the life of the
process, kept in the root’s
settings.json, which a write replaces whole. - profile_
source - The settings of the profile at
root: what a host gave it to keep them (keep_profile), else its own document (profile). - register_
fallback - Where this process reads its settings when its host installed none: what the profile’s
session left for processes outside it, for a process started outside the session. The
process’s starter registers it (its
main, or the app runner as it starts an app), never a library: a process that registered none reads every setting’s default. - scoped_
source - section_
of - Section
nameofdocas an object. A missing section, or one that is not an object, yields an empty map. - source
- The settings of this process: the source its host installed, else the fallback its starter
registered (
register_fallback);Nonewhere there is neither, and every setting reads as its default.
Type Aliases§
- Fallback
- What gives the settings a process reads when its host installed none.
- Listener
- What a reader runs when the document changed: hand the news on, nothing slow; it runs on the thread that made or noticed the change.
- Section
Change - What a read-modify-write makes of the current section: the leaves to merge into it. Called once, with the section as stored at that moment.