pub struct Suite { /* private fields */ }Expand description
The per-user suite directory that holds runtime/<service>/service.json
and other shared state. Always absolute.
Implementations§
Source§impl Suite
impl Suite
Sourcepub fn resolve() -> Result<Suite, SuiteError>
pub fn resolve() -> Result<Suite, SuiteError>
The real per-user suite root, always Suite::per_user_default: no environment variable
(RIGHTKIT_SUITE_ROOT, HOME, LOCALAPPDATA or any other) redirects it, in any build.
There is no test mode (Adrian, 2026-11-03: “dev mode, is mine … real data. snapshot and
restore.”); QA protects the real data with the rightkit-qa snapshot and restore.
Sourcepub fn per_user_default() -> Result<Suite, SuiteError>
pub fn per_user_default() -> Result<Suite, SuiteError>
The per-user default suite root from the operating system’s account database, never from
the environment: no RIGHTKIT_SUITE_ROOT/RIGHT_SUITE_DIR/ORTHIC_SHARED_DIR, no HOME,
no XDG_DATA_HOME, no LOCALAPPDATA. This is what a release build of an app or of its
command-line engine should use, on the host side as well as the client side, so that a
launcher cannot point either at a different directory.
- macOS:
<home>/Library/Application Support/Orthic Labs/shared,<home>fromgetpwuid_r(geteuid()). - Linux:
<home>/.local/share/Orthic Labs/shared.XDG_DATA_HOMEis an environment variable and is ignored, so a user who relocated it must host with this function too, or host and hardened client disagree on the root. - Windows:
<profile>\AppData\Local\Orthic Labs\shared,<profile>fromGetUserProfileDirectoryWon the process token.%USERPROFILE%and%LOCALAPPDATA%are ignored, so a launcher that sets them (a QA home) cannot move the real root. - Other Unix: not implemented; fails closed.
Sourcepub fn resolve_ignoring_env_overrides(
ignore_env_overrides: bool,
) -> Result<Suite, SuiteError>
👎Deprecated since 0.1.6: use rightkit_daemon::mode::{decide, roots}
pub fn resolve_ignoring_env_overrides( ignore_env_overrides: bool, ) -> Result<Suite, SuiteError>
use rightkit_daemon::mode::{decide, roots}
Kept for existing callers: the flag is ignored, because no build reads an override
variable any more. An alias of Suite::per_user_default.
Sourcepub fn env_derived(&self) -> bool
pub fn env_derived(&self) -> bool
Whether the root was derived from the environment. Always false: no constructor reads one.
Sourcepub fn at(root: impl Into<PathBuf>) -> Result<Suite, SuiteError>
pub fn at(root: impl Into<PathBuf>) -> Result<Suite, SuiteError>
An explicit absolute root (isolated dev profiles, tests).
Sourcepub fn per_run_temp(label: &str) -> Result<Suite, SuiteError>
pub fn per_run_temp(label: &str) -> Result<Suite, SuiteError>
A fresh private directory under the OS temp dir, deleted when the last clone is dropped. The explicit alternative to a missing app-data root.
pub fn root(&self) -> &Path
Sourcepub fn service_dir(&self, service: &str) -> PathBuf
pub fn service_dir(&self, service: &str) -> PathBuf
<suite>/runtime/<service>.
Sourcepub fn private_service_subdir(
&self,
service: &str,
name: &str,
) -> Result<PathBuf, SuiteError>
pub fn private_service_subdir( &self, service: &str, name: &str, ) -> Result<PathBuf, SuiteError>
A private (owner-only) directory under <suite>/runtime/<service>, e.g. shots.