pub trait Filler<W, E>where
W: Write,{
// Required method
fn fill(&mut self, output: &mut W, key: &str) -> Result<(), E>;
}Expand description
Implementers of this trait have the ability to fill template strings.
It is extremely strongly recommended that fillers only push to the output, and do not perform any other modifications of it.
I mean, if you implement Filler<String, _>, you get a &mut String and it’s possible to do
other things with it, but that’s a terrible idea. I’m almost ashamed of ideas like making {␡}
pop the last character, and {←rot13} ROT-13-encode what precedes it in the string.
Required Methods§
Implementations on Foreign Types§
Source§impl<K, V, W> Filler<W, SimpleFillerError> for &BTreeMap<K, V>
Available on crate feature alloc only.
impl<K, V, W> Filler<W, SimpleFillerError> for &BTreeMap<K, V>
Available on crate feature
alloc only.Source§impl<K, V, W> Filler<W, SimpleFillerError> for &HashMap<K, V>
Available on crate feature std only.
impl<K, V, W> Filler<W, SimpleFillerError> for &HashMap<K, V>
Available on crate feature
std only.