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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cloner
impl RefUnwindSafe for Cloner
impl Send for Cloner
impl Sync for Cloner
impl Unpin for Cloner
impl UnsafeUnpin for Cloner
impl UnwindSafe for Cloner
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