pub struct Workspace {
pub root: PathBuf,
pub config: WorkspaceConfig,
pub projects: Vec<Project>,
}Fields§
§root: PathBuf§config: WorkspaceConfig§projects: Vec<Project>Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn discover(start: &Path) -> Result<Workspace, WorkspaceError>
pub fn discover(start: &Path) -> Result<Workspace, WorkspaceError>
Walk up from start to the directory containing rigg.yaml, then load
the workspace config and scan projects/*/project.yaml.
Sourcepub fn load(root: &Path) -> Result<Workspace, WorkspaceError>
pub fn load(root: &Path) -> Result<Workspace, WorkspaceError>
Load a workspace whose root is known to contain rigg.yaml.
pub fn project(&self, name: &str) -> Result<&Project, WorkspaceError>
Sourcepub fn resolve_env(
&self,
selected: Option<&str>,
) -> Result<ResolvedEnv, WorkspaceError>
pub fn resolve_env( &self, selected: Option<&str>, ) -> Result<ResolvedEnv, WorkspaceError>
Resolve an environment: explicit selection > RIGG_ENV > default: true.
pub fn default_env_name(&self) -> Option<&str>
Sourcepub fn files_root(&self) -> PathBuf
pub fn files_root(&self) -> PathBuf
Directory holding rigg’s file trees (projects/, apis/, .rigg/) —
the workspace root unless root: in rigg.yaml relocates them.
pub fn apis_dir(&self) -> PathBuf
pub fn state_dir(&self, env: &str, project: &str) -> PathBuf
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl UnwindSafe for Workspace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more