|
|
|
@ -30,13 +30,12 @@ pub trait Renderable {
|
|
|
|
|
pub trait Loopable {
|
|
|
|
|
/// Return the elements for a Dust section
|
|
|
|
|
///
|
|
|
|
|
/// Sections in dust are accomplished with the {#path} syntax. A
|
|
|
|
|
/// section has a truthiness check performed on it. If that
|
|
|
|
|
/// truthiness check fails, then it will render the
|
|
|
|
|
/// else-block. Otherwise if its a scalar value it will render
|
|
|
|
|
/// once with the context being the element at that path. Finally,
|
|
|
|
|
/// if its an array-like value then it will render n-times, once
|
|
|
|
|
/// for each element of the array.
|
|
|
|
|
/// Sections in dust are accomplished with the {#path} syntax. If
|
|
|
|
|
/// its an array-like value then it will render n-times, once for
|
|
|
|
|
/// each element of the array. If this is a scalar value, then
|
|
|
|
|
/// return an empty array. Sections with scalar values will still
|
|
|
|
|
/// be rendered (only once) if their truthiness check comes back
|
|
|
|
|
/// true.
|
|
|
|
|
fn get_loop_elements(&self) -> Vec<&dyn ContextElement>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|