Skip to main content

Suite

Struct Suite 

Source
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

Source

pub fn app_root(&self, app: &str) -> Result<AppRoot, AppRootError>

The per-app root for app, created private. See AppRoot.

Source§

impl Suite

Source

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.

Source

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> from getpwuid_r(geteuid()).
  • Linux: <home>/.local/share/Orthic Labs/shared. XDG_DATA_HOME is 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> from GetUserProfileDirectoryW on 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.
Source

pub fn resolve_ignoring_env_overrides( ignore_env_overrides: bool, ) -> Result<Suite, SuiteError>

👎Deprecated since 0.1.6:

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.

Source

pub fn env_derived(&self) -> bool

Whether the root was derived from the environment. Always false: no constructor reads one.

Source

pub fn at(root: impl Into<PathBuf>) -> Result<Suite, SuiteError>

An explicit absolute root (isolated dev profiles, tests).

Source

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.

Source

pub fn root(&self) -> &Path

Source

pub fn service_dir(&self, service: &str) -> PathBuf

<suite>/runtime/<service>.

Source

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.

Source

pub fn data_dir(&self, area: &str) -> Result<PathBuf, SuiteError>

<suite>/<area>: shared app data that must not be relative to the cwd (screenshots, evidence, models). Created private to the user.

Trait Implementations§

Source§

impl Clone for Suite

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Suite

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Suite

§

impl RefUnwindSafe for Suite

§

impl Send for Suite

§

impl Sync for Suite

§

impl Unpin for Suite

§

impl UnsafeUnpin for Suite

§

impl UnwindSafe for Suite

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.