[][src]Struct cargo_clone::Cloner

pub struct Cloner { /* fields omitted */ }

A struct containg all url and workspace information necessary to clone a crate.

Implementations

impl Cloner[src]

pub fn new() -> Cloner[src]

Create a Crate Cloner using all the default settings

pub fn set_registry_url(&mut self, value: impl Into<String>) -> &mut Self[src]

Sets the URL to use for downloading .crate files from crates.io.

pub fn set_github_url(&mut self, value: impl Into<String>) -> &mut Self[src]

Sets the URL to use for downloading GitHub repositories.

pub fn set_gitlab_url(&mut self, value: impl Into<String>) -> &mut Self[src]

Sets the URL to use for downloading GitLab repositories.

pub fn set_bitbucket_url(&mut self, value: impl Into<String>) -> &mut Self[src]

Sets the URL to use for downloading Bitbucket repositories.

pub fn set_out_dir(&mut self, value: impl Into<PathBuf>) -> &mut Self[src]

Sets the directory where the clone will be done.

The package will appear as a directory underneath the given path.

pub fn clone(
    &self,
    method_kind: CloneMethodKind,
    spec: &str,
    version: Option<&str>,
    extra: &[&str]
) -> Result<(), Error>
[src]

Clones a crate using the provided method.

  • method_kind - Method to fetch crate.
  • spec - The name of the crate to clone
  • version - The semantic version (semver) of the spec crate to clone
  • extra - Additional arguments passed to clone command.

Trait Implementations

impl Clone for Cloner[src]

impl Debug for Cloner[src]

Auto Trait Implementations

impl RefUnwindSafe for Cloner

impl Send for Cloner

impl Sync for Cloner

impl Unpin for Cloner

impl UnwindSafe for Cloner

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.