From 795554e84ad923ae249d22c6145b194678ff7d89 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Wed, 29 Mar 2023 17:49:42 -0700 Subject: Template::SIZE_HINT: add documentation --- askama/src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/askama/src/lib.rs b/askama/src/lib.rs index 17085b5..906c79a 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -99,7 +99,15 @@ pub trait Template: fmt::Display { /// The template's extension, if provided const EXTENSION: Option<&'static str>; - /// Provides a conservative estimate of the expanded length of the rendered template + /// Provides a rough estimate of the expanded length of the rendered template. Larger + /// values result in higher memory usage but fewer reallocations. Smaller values result in the + /// opposite. This value only affects [`render`]. It does not take effect when calling + /// [`render_into`], [`write_into`], the [`fmt::Display`] implementation, or the blanket + /// [`ToString::to_string`] implementation. + /// + /// [`render`]: Template::render + /// [`render_into`]: Template::render_into + /// [`write_into`]: Template::write_into const SIZE_HINT: usize; /// The MIME type (Content-Type) of the data that gets rendered by this Template -- cgit