pub struct TemplateManager {
pub config: Config,
/* private fields */
}Fields§
§config: ConfigImplementations§
Source§impl TemplateManager
impl TemplateManager
pub fn new() -> Result<Self>
pub fn save_config(&self) -> Result<()>
pub fn get_template_by_id(&self, id: &str) -> Option<&Template>
pub fn get_repo_by_name(&self, name: &str) -> Option<&Repo>
pub async fn download_template( &self, template: &Template, force: bool, ) -> Result<()>
pub async fn download_all_templates(&self, force: bool) -> Result<()>
pub fn list_templates(&self, verbose: bool)
pub fn add_template( &mut self, id: String, name: String, repo: String, path: String, description: String, language: String, tags: Option<String>, ) -> Result<()>
pub fn remove_template(&mut self, id: &str) -> Result<()>
pub fn add_repo( &mut self, name: String, url: String, branch: String, ) -> Result<()>
pub fn remove_repo(&mut self, name: &str) -> Result<()>
pub fn copy_template_files( &self, template: &Template, project_path: &Path, ) -> Result<()>
pub fn list_repos(&self)
pub fn export_config(&self, output: &str, include_cache: bool) -> Result<()>
pub fn import_config( &mut self, file: &str, mode: &str, skip_validation: bool, ) -> Result<()>
pub fn validate_config_file(&self, file: &str) -> Result<()>
pub fn clean_templates(&mut self, all: bool, force: bool) -> Result<()>
pub fn show_info(&self, json: bool) -> Result<()>
Auto Trait Implementations§
impl Freeze for TemplateManager
impl RefUnwindSafe for TemplateManager
impl Send for TemplateManager
impl Sync for TemplateManager
impl Unpin for TemplateManager
impl UnsafeUnpin for TemplateManager
impl UnwindSafe for TemplateManager
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