pub struct NewArgs {
pub with_parent: bool,
pub template_name: TemplateName,
pub target_path: Option<PathBuf>,
pub max_depth: u8,
}Expand description
Arguments necessary to spawn a snippet
Fields§
§with_parent: boolSpawn with whole path leading to given snippet
template_name: TemplateNamePath to snippet
target_path: Option<PathBuf>Target dir, pwd by default
max_depth: u8Max depth that should be copied
Trait Implementations§
Source§impl StructOpt for NewArgs
impl StructOpt for NewArgs
Source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Creates the struct from
clap::ArgMatches. It cannot fail
with a parameter generated by clap by construction.Source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
Gets the struct from the command line arguments. Print the
error message and quit the program in case of failure.
Source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Gets the struct from any iterator such as a
Vec of your making.
Print the error message and quit the program in case of failure.Auto Trait Implementations§
impl Freeze for NewArgs
impl RefUnwindSafe for NewArgs
impl Send for NewArgs
impl Sync for NewArgs
impl Unpin for NewArgs
impl UnsafeUnpin for NewArgs
impl UnwindSafe for NewArgs
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