Struct cargo_clone::Cloner
source · pub struct Cloner { /* private fields */ }Expand description
A struct containg all url and workspace information necessary to clone a crate.
Implementations§
source§impl Cloner
impl Cloner
sourcepub fn set_registry_url(&mut self, value: impl Into<String>) -> &mut Self
pub fn set_registry_url(&mut self, value: impl Into<String>) -> &mut Self
Sets the URL to use for downloading .crate files from crates.io.
sourcepub fn set_github_url(&mut self, value: impl Into<String>) -> &mut Self
pub fn set_github_url(&mut self, value: impl Into<String>) -> &mut Self
Sets the URL to use for downloading GitHub repositories.
sourcepub fn set_gitlab_url(&mut self, value: impl Into<String>) -> &mut Self
pub fn set_gitlab_url(&mut self, value: impl Into<String>) -> &mut Self
Sets the URL to use for downloading GitLab repositories.
sourcepub fn set_bitbucket_url(&mut self, value: impl Into<String>) -> &mut Self
pub fn set_bitbucket_url(&mut self, value: impl Into<String>) -> &mut Self
Sets the URL to use for downloading Bitbucket repositories.
sourcepub fn set_out_dir(&mut self, value: impl Into<PathBuf>) -> &mut Self
pub fn set_out_dir(&mut self, value: impl Into<PathBuf>) -> &mut Self
Sets the directory where the clone will be done.
The package will appear as a directory underneath the given path.
sourcepub fn clone(
&self,
method_kind: CloneMethodKind,
spec: &str,
version: Option<&str>,
extra: &[&str]
) -> Result<(), Error>
pub fn clone( &self, method_kind: CloneMethodKind, spec: &str, version: Option<&str>, extra: &[&str] ) -> Result<(), Error>
Clones a crate using the provided method.
method_kind- Method to fetch crate.spec- The name of the crate to cloneversion- The semantic version (semver) of the spec crate to cloneextra- Additional arguments passed to clone command.