pub struct TemplateContext {
pub input_path: Rc<PathBuf>,
pub output_path: Rc<PathBuf>,
pub file: File,
pub other_files: HashMap<Rc<PathBuf>, File>,
pub variables: HashMap<String, String>,
pub dependencies: Vec<Rc<PathBuf>>,
}
Fields§
§input_path: Rc<PathBuf>
§output_path: Rc<PathBuf>
§file: File
§other_files: HashMap<Rc<PathBuf>, File>
§variables: HashMap<String, String>
§dependencies: Vec<Rc<PathBuf>>
Implementations§
Source§impl TemplateContext
impl TemplateContext
pub fn write_all(&mut self, content: &[u8]) -> Result<(), HtmlError>
pub fn write_char(&mut self, char: char) -> Result<(), Error>
pub fn create_output_path(&self, path: PathBuf) -> PathBuf
pub fn create_input_path(&self, path: impl AsRef<Path>) -> PathBuf
pub fn push_output(&mut self, path: &PathBuf) -> Result<(), Error>
pub fn is_debug(&self) -> bool
pub fn should_remove_whitespaces(&self) -> bool
pub fn should_remove_comments(&self) -> bool
pub fn remove_output_by_path(&mut self, path: &PathBuf)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TemplateContext
impl RefUnwindSafe for TemplateContext
impl !Send for TemplateContext
impl !Sync for TemplateContext
impl Unpin 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