pub struct Configuration {
pub template: TemplateSource,
pub cargo_lock_path: PathBuf,
pub target_path: Option<PathBuf>,
pub post_template_search: Option<String>,
pub post_template_replace: String,
pub include_root: bool,
pub maximum_depth: Option<usize>,
}Expand description
Configuration struct
templatecan be either aFileorTextcargo_lock_pathis the path toCargo.lock(filled by default)target_pathif not specified is deduced fortemplate(iftemplate is specified asFile) by removing the.template.` name part.post_template_search/post_template_replaceallows to perform a post template replacement (to perform cleanup)include_rootif the root crate (the one currently being built) has to be includedmaximum_depthwhen specified allows to limit recursion (the only interest here is probably1)
Fields§
§template: TemplateSource§cargo_lock_path: PathBuf§target_path: Option<PathBuf>§post_template_search: Option<String>§post_template_replace: String§include_root: bool§maximum_depth: Option<usize>Implementations§
Source§impl Configuration
impl Configuration
pub fn target_path(&self) -> PathBuf
pub fn template_text(&self) -> String
Trait Implementations§
Source§impl Default for Configuration
impl Default for Configuration
Source§fn default() -> Self
fn default() -> Self
Default values for Configuration are
template: TemplateSource::File(“src/deps.template.rs”.into()), read template fromsrc/deps.template.rscargo_lock_path: theCargo.lock(how surprising 😅)target_path:None(will be deduced from source path)post_template_search/post_template_replace:"//{}"/""(meaning//{}is removed)include_root:falsemaximum_depth:None
Auto Trait Implementations§
impl Freeze for Configuration
impl RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl UnwindSafe for Configuration
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