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
Sourcepub async fn publish(&self, config: &Config) -> Result<PublishOutput>
pub async fn publish(&self, config: &Config) -> Result<PublishOutput>
§Errors
Returns error if the underlying publish call fails to spawn.
Sourcepub async fn dry_run_publish(
&self,
config: &Config,
) -> Result<Option<PublishOutput>>
pub async fn dry_run_publish( &self, config: &Config, ) -> Result<Option<PublishOutput>>
Run the publish command in dry-run mode.
Returns Ok(None) when dry-run is not supported for this project’s
language and no override is configured in config.publish_dry_run.
§Errors
Returns error if the underlying dry-run publish call fails to spawn.