pub struct RenderStats {
pub render_time_ms: u64,
pub cache_hit: bool,
pub latex_equations: usize,
pub code_blocks: usize,
pub template_substitutions: usize,
pub output_size_bytes: usize,
}Expand description
Rendering statistics
Fields§
§render_time_ms: u64Time taken to render in milliseconds
cache_hit: boolWhether cache was used
latex_equations: usizeNumber of LaTeX equations rendered
code_blocks: usizeNumber of code blocks highlighted
template_substitutions: usizeNumber of template substitutions
output_size_bytes: usizeSize of rendered output in bytes
Implementations§
Source§impl RenderStats
impl RenderStats
Sourcepub fn with_render_time(self, duration: Duration) -> Self
pub fn with_render_time(self, duration: Duration) -> Self
Set render time
Sourcepub fn with_cache_hit(self, hit: bool) -> Self
pub fn with_cache_hit(self, hit: bool) -> Self
Set cache hit
Sourcepub fn increment_latex(&mut self)
pub fn increment_latex(&mut self)
Increment LaTeX equation count
Sourcepub fn increment_code_blocks(&mut self)
pub fn increment_code_blocks(&mut self)
Increment code block count
Sourcepub fn increment_template_substitutions(&mut self)
pub fn increment_template_substitutions(&mut self)
Increment template substitution count
Sourcepub fn with_output_size(self, size: usize) -> Self
pub fn with_output_size(self, size: usize) -> Self
Set output size
Trait Implementations§
Source§impl Clone for RenderStats
impl Clone for RenderStats
Source§fn clone(&self) -> RenderStats
fn clone(&self) -> RenderStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RenderStats
impl Debug for RenderStats
Source§impl Default for RenderStats
impl Default for RenderStats
Source§fn default() -> RenderStats
fn default() -> RenderStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RenderStats
impl<'de> Deserialize<'de> for RenderStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RenderStats
impl RefUnwindSafe for RenderStats
impl Send for RenderStats
impl Sync for RenderStats
impl Unpin for RenderStats
impl UnsafeUnpin for RenderStats
impl UnwindSafe for RenderStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more