Skip to main content

Module store

Module store 

Source
Expand description

The store: where QCode’s settings, workspaces and profiles live on disk.

Six things live here, and each of them is readable without ever panicking:

  • HostDirs holds the default store location, which the framework works out.
  • Config is the application’s code.conf, checked and repaired by a Schema.
  • WorkspaceId turns a display name into a name every file system accepts.
  • Store creates and reads the folder tree of the store and its workspaces.
  • Session records which workspaces and tabs were open, so they can be opened again.
  • Registry records the containers QCode started, so they can be stopped once no QCode is open.

Every loader answers with a Loaded: the part that could be used, plus a Diagnostic for each problem, pointing at the file, line and column where it is.

Structs§

Config
QCode’s settings file.
HostDirs
The places of the machine the wizard offers a store from.
Loaded
What could be read, together with everything that was wrong with it.
Registered
A container QCode started, and the engine it started it with.
Registry
The containers QCode started, in the order it first started them.
Session
The workspaces that were open, in the order the rail showed them.
SessionTab
One tab of a saved session.
SessionWorkspace
One workspace of a saved session, with its tabs in the order they were shown.
Store
A store directory: the workspaces and profiles of one installation.
WorkspaceEntry
One workspace folder as it was found on disk.
WorkspaceFile
The contents of a workspace’s workspace.qcode.
WorkspaceId
The name a workspace has on disk: lower-case ASCII letters and digits, separated by -.
WorkspacePaths
Where everything of one workspace is.
WorkspaceProfile
One profile a workspace carries, as workspace.qcode records it.

Enums§

NewWorkspaceError
Why a new workspace could not be made.
OnClose
What happens to QCode’s containers once no QCode is open any more.
Platform
The operating system the paths are resolved for.
SessionTabKind
What a tab of a saved session opens.
SetupStep
The step of the setup wizard the application stopped at.
WorkspaceIdError
Why a display name or a stored identifier cannot be used.

Constants§

APP
QCode’s id in the family: its settings file is code.conf and its other files are under code/.
APP_TITLE
QCode’s name in its family, as the person reads it: the store is the folder of this name under the family’s folder in Documents.
PREFIX
What every container QCode creates is called by, and the one thing that lets a name into the list: crate::engine::names builds every container name on it.

Functions§

add_profile
Records in the workspace at paths that it carries the profile name, added on added, and answers with the file as it now stands.
remove_profile
Records in the workspace at paths that it no longer carries the profile name, because the profile was deleted, and answers with the file as it now stands.
set_backup_assets
Records in the workspace at paths whether its backup takes Assets/ too, and answers with the file as it now stands. The file is read again first, as for set_backup_skip, and written only when the choice changed.
set_backup_skip
Records in the workspace at paths that its backup leaves keys out, or takes them in again when skip is false, and answers with the file as it now stands.