pub struct TemplateContext {
pub target: Option<String>,
pub module: Option<String>,
pub file: Option<String>,
pub branch: Option<String>,
}Expand description
Context for template variable substitution
Fields§
§target: Option<String>The target file/path provided by user
module: Option<String>Module name derived from target (e.g., “src/cli/task.rs” -> “cli::task”)
file: Option<String>Filename only (e.g., “src/cli/task.rs” -> “task.rs”)
branch: Option<String>Current git branch name
Trait Implementations§
Source§impl Clone for TemplateContext
impl Clone for TemplateContext
Source§fn clone(&self) -> TemplateContext
fn clone(&self) -> TemplateContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemplateContext
impl Debug for TemplateContext
Source§impl Default for TemplateContext
impl Default for TemplateContext
Source§fn default() -> TemplateContext
fn default() -> TemplateContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TemplateContext
impl RefUnwindSafe for TemplateContext
impl Send for TemplateContext
impl Sync for TemplateContext
impl Unpin for TemplateContext
impl UnsafeUnpin for TemplateContext
impl UnwindSafe for TemplateContext
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