Struct cargo_generate::Args[][src]

pub struct Args {
    pub list_favorites: bool,
    pub favorite: Option<String>,
    pub git: Option<String>,
    pub branch: Option<String>,
    pub name: Option<String>,
    pub force: bool,
    pub verbose: bool,
    pub template_values_file: Option<String>,
    pub silent: bool,
    pub config: Option<PathBuf>,
    pub vcs: Vcs,
}

Fields

list_favorites: bool

List defined favorite templates from the config

favorite: Option<String>

Generate a favorite template as defined in the config

git: Option<String>

Git repository to clone template from. Can be a URL (like https://github.com/rust-cli/cli-template), a path (relative or absolute), or an owner/repo abbreviated GitHub URL (like rust-cli/cli-template). Note that cargo generate will first attempt to interpret the owner/repo form as a relative path and only try a GitHub URL if the local path doesn’t exist.

branch: Option<String>

Branch to use when installing from git

name: Option<String>

Directory to create / project name; if the name isn’t in kebab-case, it will be converted to kebab-case unless --force is given.

force: bool

Don’t convert the project name to kebab-case before creating the directory. Note that cargo generate won’t overwrite an existing directory, even if --force is given.

verbose: bool

Enables more verbose output.

template_values_file: Option<String>

Pass template values through a file Values should be in the format key=value, one per line

silent: bool

If silent mode is set all variables will be extracted from the template_values_file. If a value is missing the project generation will fail

config: Option<PathBuf>

Use specific configuration file. Defaults to $CARGO_HOME/cargo-generate or $HOME/.cargo/cargo-generate

vcs: Vcs

Specify the VCS used to initialize the generated template.

Trait Implementations

impl Debug for Args[src]

impl StructOpt for Args[src]

impl StructOptInternal for Args[src]

Auto Trait Implementations

impl RefUnwindSafe for Args

impl Send for Args

impl Sync for Args

impl Unpin for Args

impl UnwindSafe for Args

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,