pub struct TemplateDebugger { /* private fields */ }Expand description
Template debugger for development and troubleshooting
Implementations§
Source§impl TemplateDebugger
impl TemplateDebugger
Sourcepub fn track_variables(self, track: bool) -> Self
pub fn track_variables(self, track: bool) -> Self
Enable/disable variable usage tracking
Sourcepub fn track_functions(self, track: bool) -> Self
pub fn track_functions(self, track: bool) -> Self
Enable/disable function call tracking
Sourcepub fn validate_syntax(self, validate: bool) -> Self
pub fn validate_syntax(self, validate: bool) -> Self
Enable/disable syntax validation
Sourcepub fn profile_performance(self, profile: bool) -> Self
pub fn profile_performance(self, profile: bool) -> Self
Enable/disable performance profiling
Sourcepub fn analyze(
&self,
template_content: &str,
template_name: &str,
) -> Result<DebugInfo>
pub fn analyze( &self, template_content: &str, template_name: &str, ) -> Result<DebugInfo>
Analyze template for debugging information
§Arguments
template_content- Template source contenttemplate_name- Template name for reporting
Sourcepub fn debug_render(
&self,
template_content: &str,
context: &TemplateContext,
template_name: &str,
) -> Result<DebugInfo>
pub fn debug_render( &self, template_content: &str, context: &TemplateContext, template_name: &str, ) -> Result<DebugInfo>
Debug template rendering with context
§Arguments
template_content- Template contentcontext- Template contexttemplate_name- Template name
Sourcepub fn find_unused_variables(
&self,
debug_info: &DebugInfo,
context: &TemplateContext,
) -> Vec<String>
pub fn find_unused_variables( &self, debug_info: &DebugInfo, context: &TemplateContext, ) -> Vec<String>
Find unused variables in template compared to context
§Arguments
debug_info- Debug info from template analysiscontext- Template context
Sourcepub fn find_missing_variables(
&self,
debug_info: &DebugInfo,
context: &TemplateContext,
) -> Vec<String>
pub fn find_missing_variables( &self, debug_info: &DebugInfo, context: &TemplateContext, ) -> Vec<String>
Find missing variables (used in template but not in context)
§Arguments
debug_info- Debug info from template analysiscontext- Template context
Trait Implementations§
Source§impl Debug for TemplateDebugger
impl Debug for TemplateDebugger
Auto Trait Implementations§
impl Freeze for TemplateDebugger
impl RefUnwindSafe for TemplateDebugger
impl Send for TemplateDebugger
impl Sync for TemplateDebugger
impl Unpin for TemplateDebugger
impl UnwindSafe for TemplateDebugger
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