pub struct Workspace {
pub root: PathBuf,
pub member_patterns: Vec<String>,
pub shared_venv: bool,
/* private fields */
}Expand description
Workspace configuration
Fields§
§root: PathBufRoot directory of the workspace
member_patterns: Vec<String>Member patterns (glob patterns or paths)
Whether to use a shared venv for all members
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn load(start_dir: &Path) -> Result<Self>
pub fn load(start_dir: &Path) -> Result<Self>
Load workspace from a directory (searches upward for workspace root)
Sourcepub fn load_from_root(root: &Path) -> Result<Self>
pub fn load_from_root(root: &Path) -> Result<Self>
Load workspace from a known root directory
Sourcepub fn find_root(start_dir: &Path) -> Result<PathBuf>
pub fn find_root(start_dir: &Path) -> Result<PathBuf>
Find workspace root by searching upward for [tool.rx.workspace]
Sourcepub fn is_workspace_root(dir: &Path) -> bool
pub fn is_workspace_root(dir: &Path) -> bool
Check if a directory is a workspace root
Sourcepub fn add_member(&mut self, path: &str) -> Result<()>
pub fn add_member(&mut self, path: &str) -> Result<()>
Add a member to the workspace
Sourcepub fn remove_member(&mut self, path: &str) -> Result<bool>
pub fn remove_member(&mut self, path: &str) -> Result<bool>
Remove a member from the workspace
Sourcepub fn lockfile_path(&self) -> PathBuf
pub fn lockfile_path(&self) -> PathBuf
Get lockfile path (at workspace root)
Sourcepub fn all_dependencies(&self) -> Result<Vec<Requirement>>
pub fn all_dependencies(&self) -> Result<Vec<Requirement>>
Collect all dependencies from all members
Sourcepub fn member_info(&self) -> Result<Vec<MemberInfo>>
pub fn member_info(&self) -> Result<Vec<MemberInfo>>
Get member info for display
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 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