pub enum ConfigLookup {
None,
File(PathBuf),
Discover,
}Expand description
Where a host that opens workspaces on someone else’s behalf — a server
opening one per session, a task resumed in another process — gets each
one’s Config.
basis-the-SDK reads no config.json unless told to: a
WorkspaceBuilder takes a Config or a
path, never a search. This is the same choice held as a value, so a host
can state it once for workspaces it has not opened yet, and a task can
record it. Discover is the CLI’s convention, asked for
by name.
Variants§
None
No file: the host’s own calls are the whole configuration.
File(PathBuf)
Exactly this file, as Config::read_file reads it.
Discover
The workspace’s .basis/config.json and the global config.json,
layered — what the basis CLI does (Config::discover).
Implementations§
Source§impl ConfigLookup
impl ConfigLookup
Sourcepub fn load(
&self,
workspace: &Path,
global_dir: Option<&Path>,
) -> Result<Config, ConfigError>
pub fn load( &self, workspace: &Path, global_dir: Option<&Path>, ) -> Result<Config, ConfigError>
Sourcepub fn load_default(&self, workspace: &Path) -> Result<Config, ConfigError>
pub fn load_default(&self, workspace: &Path) -> Result<Config, ConfigError>
load against the default global directory —
$BASIS_CONFIG_DIR, else $XDG_CONFIG_HOME/basis, else
$HOME/.config/basis.