pub enum PackageAdapter {
Cargo,
}Expand description
Package ecosystem adapter (Cargo, npm, etc.).
Variants§
Cargo
Implementations§
Source§impl PackageAdapter
impl PackageAdapter
Sourcepub fn all() -> &'static [PackageAdapter]
pub fn all() -> &'static [PackageAdapter]
All registered adapters, checked in order during workspace discovery. TODO: it’s fine for now, but eventually we could using strum or enum-iterators here.
Sourcepub fn can_discover(&self, root: &Path) -> bool
pub fn can_discover(&self, root: &Path) -> bool
Check if this adapter can handle the given directory.
Sourcepub fn discover(&self, root: &Path) -> Result<Vec<PackageInfo>, WorkspaceError>
pub fn discover(&self, root: &Path) -> Result<Vec<PackageInfo>, WorkspaceError>
Discover all packages in the workspace.
Sourcepub fn manifest_path(&self, package_dir: &Path) -> PathBuf
pub fn manifest_path(&self, package_dir: &Path) -> PathBuf
Get the path to the manifest file for a package directory.
Sourcepub fn is_publishable(&self, manifest_path: &Path) -> Result<bool>
pub fn is_publishable(&self, manifest_path: &Path) -> Result<bool>
Check if a package is publishable to its primary registry.
Sourcepub fn version_exists(&self, package_name: &str, version: &str) -> Result<bool>
pub fn version_exists(&self, package_name: &str, version: &str) -> Result<bool>
Check if a specific version already exists on the registry.
Sourcepub fn publish(
&self,
manifest_path: &Path,
dry_run: bool,
extra_args: &[String],
) -> Result<()>
pub fn publish( &self, manifest_path: &Path, dry_run: bool, extra_args: &[String], ) -> Result<()>
Execute the publish command for a package.
Sourcepub fn regenerate_lockfile(&self, workspace_root: &Path) -> Result<()>
pub fn regenerate_lockfile(&self, workspace_root: &Path) -> Result<()>
Regenerate the workspace lockfile after version updates.
Trait Implementations§
Source§impl Clone for PackageAdapter
impl Clone for PackageAdapter
Source§fn clone(&self) -> PackageAdapter
fn clone(&self) -> PackageAdapter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackageAdapter
impl Debug for PackageAdapter
impl Copy for PackageAdapter
Auto Trait Implementations§
impl Freeze for PackageAdapter
impl RefUnwindSafe for PackageAdapter
impl Send for PackageAdapter
impl Sync for PackageAdapter
impl Unpin for PackageAdapter
impl UnwindSafe for PackageAdapter
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