pub enum Project {
Workspace(Box<dyn Workspace>),
Package(Box<dyn Package>),
}Expand description
Discriminated union of Package (single project) or Workspace (monorepo root).
Provides unified interface for operations on both package and workspace projects, delegating to the appropriate trait implementation. Workspaces sort before packages in ordering comparisons.
Variants§
Workspace(Box<dyn Workspace>)
Monorepo workspace root containing multiple packages
Package(Box<dyn Package>)
Single versioned package
Implementations§
Source§impl Project
impl Project
pub fn name(&self) -> Option<&str>
pub fn version(&self) -> Option<&str>
pub fn path(&self) -> &Path
pub fn relative_path(&self) -> &Path
Sourcepub async fn update_version(&mut self, update_type: UpdateType) -> Result<()>
pub async fn update_version(&mut self, update_type: UpdateType) -> Result<()>
§Errors
Returns error if the underlying update_version call fails.
Sourcepub fn check_changed(&mut self, path: &Path) -> Result<()>
pub fn check_changed(&mut self, path: &Path) -> Result<()>
§Errors
Returns error if the underlying check_changed call fails.
pub fn is_changed(&self) -> bool
pub fn dependencies(&self) -> &HashSet<String>
pub fn add_dependency(&mut self, dependency: &str)
pub fn set_name(&mut self, name: String)
pub fn language(&self) -> Language
Trait Implementations§
Source§impl Ord for Project
impl Ord for Project
Source§impl PartialOrd for Project
impl PartialOrd for Project
impl Eq for Project
Auto Trait Implementations§
impl Freeze for Project
impl !RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnsafeUnpin for Project
impl !UnwindSafe for Project
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