fn impl_template(&mut self, ctx: &'a Context, buf: &mut Buffer) {
        self.write_header(buf, "::askama::Template", None);
        buf.writeln(
            "fn render_into(&self, writer: &mut ::std::fmt::Write) -> \
             ::askama::Result<()> {",
        );

        if let Some(heritage) = self.heritage {
            self.handle(heritage.root, heritage.root.nodes, buf, AstLevel::Top);
        } else {
            self.handle(ctx, &ctx.nodes, buf, AstLevel::Top);
        }

        self.flush_ws(buf, WS(false, false));
        buf.writeln("Ok(())");
        buf.writeln("}");

        buf.writeln("fn extension() -> Option<&'static str> {");
        buf.writeln(&format!(
            "{:?}",
            self.input.path.extension().map(|s| s.to_str().unwrap())
        ));
        buf.writeln("}");

        buf.writeln("}");
    }
// Implement `Template` for the given context struct.
Implement `Template` for the given context struct.
Implement ` Template ` for the given context struct .
fn impl_template(&mut self, ctx: &'a Context, buf: &mut Buffer) {
        self.write_header(buf, "::askama::Template", None);
        buf.writeln(
            "fn render_into(&self, writer: &mut ::std::fmt::Write) -> \
             ::askama::Result<()> {",
        );
        if let Some(heritage) = self.heritage {
            self.handle(heritage.root, heritage.root.nodes, buf, AstLevel::Top);
        } else {
            self.handle(ctx, &ctx.nodes, buf, AstLevel::Top);
        }
        self.flush_ws(buf, WS(false, false));
        buf.writeln("Ok(())");
        buf.writeln("}");
        buf.writeln("fn extension() -> Option<&'static str> {");
        buf.writeln(&format!(
            "{:?}",
            self.input.path.extension().map(|s| s.to_str().unwrap())
        ));
        buf.writeln("}");
        buf.writeln("}");
    }
fn impl_template ( & mut self , ctx : & ' a Context , buf : & mut Buffer ) { self . write_header ( buf , " " , None ) ; buf . writeln ( " \
 " , ) ; if let Some ( heritage ) = self . heritage { self . handle ( heritage . root , heritage . root . nodes , buf , AstLevel :: Top ) ; } else { self . handle ( ctx , & ctx . nodes , buf , AstLevel :: Top ) ; } self . flush_ws ( buf , WS ( false , false ) ) ; buf . writeln ( " " ) ; buf . writeln ( " " ) ; buf . writeln ( " " ) ; buf . writeln ( & format ! ( " " self input path extension ( ) map ( s s to_str ( ) unwrap ( ) ) ) ) ; buf . writeln ( " " ) ; buf . writeln ( " " ) ; }
Implement `Template` for the given context struct.
Implement ` Template ` for the given context struct .
&mut self
ctx
&'a Context
buf
&mut Buffer
&mut self
ctx
&'a Context
buf
&mut Buffer