horrorshow/ops.rs
1use core::ops::Shl;
2
3use crate::render::RenderOnce;
4use crate::template::TemplateBuffer;
5
6impl<'a, 'b, T> Shl<T> for &'a mut TemplateBuffer<'b>
7where
8 T: RenderOnce,
9{
10 type Output = ();
11 /// Render the component into the template.
12 ///
13 /// Note: If writing to the template fails, this method will neither panic nor return errors.
14 /// Instead, no more data will be written to the template and horrorshow abort template
15 /// rendering (return an error) when it re-gains control.
16 fn shl(self, component: T) {
17 component.render_once(self);
18 }
19}