pub trait Executer: Send + Sync {
// Required methods
fn copy_file(&self, path: &Path) -> Result<PathBuf>;
fn create_file(&self, path: &Path, content: String) -> Result<PathBuf>;
fn copy_dir(&self, path: &Path) -> Result<()>;
fn copy_template(&self, path: &Path, data: &Settings) -> Result<()>;
fn copy_template_dir(&self, path: &Path, data: &Settings) -> Result<()>;
}Required Methods§
Sourcefn copy_file(&self, path: &Path) -> Result<PathBuf>
fn copy_file(&self, path: &Path) -> Result<PathBuf>
Copies a single file from the specified path.
§Errors
Returns an error if the file cannot be copied, such as if the path is invalid or if a file system error occurs.
Sourcefn create_file(&self, path: &Path, content: String) -> Result<PathBuf>
fn create_file(&self, path: &Path, content: String) -> Result<PathBuf>
Copies a single file from the specified path.
§Errors
Returns an error if the file cannot be copied, such as if the path is invalid or if a file system error occurs.
Sourcefn copy_dir(&self, path: &Path) -> Result<()>
fn copy_dir(&self, path: &Path) -> Result<()>
Copies an entire directory from the specified path.
§Errors
Returns an error if the directory cannot be copied, such as if the path is invalid or if a file system error occurs.