Removed the Source enum, Template source is now once again just a plain Cow<str>.
Templates has been renamed to Ramhorns.
Added Ramhorns::lazy and Ramhorns::from_file, which allows you to do what Template::from_file could do before:
use ramhorns::Ramhorns;
let mut tpls = Ramhorns::lazy("templates").unwrap(); // Verifies the path, doesn't do any work
let tpl = tpls.from_file("hello.html").unwrap(); // Will load and parse the template on first call
~Might need a better naming scheme for the methods. Also thinking about renaming Templates to Ramhorns: it's a common pattern in template engines for the main template aggregator to be named after the library, and it might help disambiguate Templates and Template for dyslexics :).~
Template::from_file
Source
enum,Template
source is now once again just a plainCow<str>
.Templates
has been renamed toRamhorns
.Ramhorns::lazy
andRamhorns::from_file
, which allows you to do whatTemplate::from_file
could do before:~Might need a better naming scheme for the methods. Also thinking about renaming
Templates
toRamhorns
: it's a common pattern in template engines for the main template aggregator to be named after the library, and it might help disambiguateTemplates
andTemplate
for dyslexics :).~