Commit graph

82 commits

Author SHA1 Message Date
Chris Wong
9fa87721e6 Rewrite Render and RenderOnce traits
... to make them more user-friendly.

Closes 
2016-10-08 21:50:59 +13:00
Chris Wong
4284875869 Change escaper to use bytes instead of chars
This removes the overhead from UTF-8 encoding, and makes us faster than
Horrorshow again :)
2016-10-05 20:43:24 +13:00
Chris Wong
fedaded75a Release 0.11.1 2016-09-25 12:50:33 +13:00
Chris Wong
a4c43dbd3a Documentation nit: "input data" -> "value" 2016-09-25 12:30:12 +13:00
Chris Wong
0c437ca9d3 Do not implement traits on type aliases
Due to , trait `impl`s on type aliases are not shown
in automatically generated documentation. Until this bug is fixed, it is
better not to write code this way.
2016-09-25 12:25:21 +13:00
Chris Wong
84cb8cfe37 Flesh out documentation for runtime library 2016-09-24 19:11:59 +12:00
Chris Wong
d34c558f3b Release 0.11.0 2016-09-24 12:17:35 +12:00
Chris Wong
c832e2edb4 Specialize Render for strings 2016-09-23 19:45:41 +12:00
Chris Wong
f12efe4299 Rewrite everything to use Strings instead of writers
After fiddling around with zero-allocation solutions, I concluded that
all non-allocating approaches are too annoying to work with in realistic
code. Using closures leads to yak-shaving with lifetimes; and because
Iron needs to take ownership of the response body we often end up
cloning the input data anyway.

Removing this constraint has let me simplify the entire system, removing
a net 300 lines from the library. The `html!` macro no longer takes a
writer, and instead returns a `PreEscaped<String>`. This means that the
result of an `html!` can be spliced directly into another `html!`,
removing the need for the `impl Template` rigmarole.

To rub it in, benchmarks show the new code is in fact *faster* than it
was before. How lovely.
2016-09-23 19:22:22 +12:00
Chris Wong
d7071d1fe9 Release 0.10.0 2016-09-20 23:58:07 +12:00
Chris Wong
aded75f01f Add some juicy impl Trait niceness 2016-08-15 20:32:39 +12:00
Chris Wong
49c5698bea Release 0.9.0 2016-06-12 15:07:11 +12:00
Chris Wong
bd82da1824 Remove unused import 2016-05-14 18:42:30 +12:00
Chris Wong
2578c9aefc Release 0.8.1 2016-04-27 16:24:41 +12:00
Chris Wong
071aac34f8 Change documentation link 2016-04-27 16:23:31 +12:00
Chris Wong
28c965ac72 Fix indentation 2016-03-22 23:15:44 +13:00
Chris Wong
9949933d41 Release 0.8.0 2016-02-28 17:53:59 +13:00
Wim Looman
6c8fbb5bad Change splice operator and add in render by-move 2016-02-02 15:56:59 +01:00
Chris Wong
3deb7a7625 Release 0.7.4 2016-01-21 21:53:22 +11:00
Chris Wong
e16aa4cce8 Release 0.7.3 2015-12-20 22:23:52 +11:00
Chris Wong
54f27e5753 Release 0.7.2 2015-11-28 21:15:56 +11:00
Chris Wong
661ac6b4bc Release 0.7.1 2015-11-20 11:08:58 +13:00
Chris Wong
c9cb438bee Release 0.7.0 2015-11-08 18:59:47 +13:00
Chris Wong
2e0aa3e433 Replace $$ syntax with a general trait thing 2015-10-06 19:25:29 +13:00
Chris Wong
48729378cf Release 0.6.2 2015-09-28 22:22:57 +13:00
Chris Wong
e1133bf720 Release 0.6.1 2015-09-26 13:57:25 +12:00
Chris Wong
344df28f90 Release 0.6.0 2015-09-16 12:36:17 +12:00
Chris Wong
a940856383 Fix doctests 2015-09-16 12:31:13 +12:00
Chris Wong
5676895dd9 Make Escaper own the wrapped writer, not borrow it 2015-09-16 12:03:09 +12:00
Chris Wong
c68f98d3a7 Expose Escaper type 2015-09-12 18:48:14 +12:00
Chris Wong
59360c719c Release 0.5.1 2015-09-08 13:15:05 +12:00
Chris Wong
86c515e5c3 Fix typo in documentation 2015-09-07 11:47:00 +12:00
Chris Wong
0286287196 Release 0.5.0 2015-09-06 13:00:47 +12:00
Chris Wong
cdcacab1ea Add Utf8Writer 2015-09-06 12:59:41 +12:00
Chris Wong
1badbd9df2 De-closureify the API
Closes 
2015-09-01 18:26:50 +12:00
Chris Wong
abbb565412 Release 0.4.4 2015-07-31 17:37:05 +12:00
Chris Wong
e66723b80b Release 0.4.3 2015-07-03 11:01:12 +12:00
Chris Wong
46fab1372b Allow nested macro invocations
Closes 
2015-07-03 10:59:34 +12:00
Chris Wong
543adf78c0 Fix formatting 2015-05-01 19:56:06 +12:00
Chris Wong
36c9792d0a Release 0.4.2 2015-04-30 16:36:47 +12:00
Chris Wong
d6677b3319 Borrow spliced values instead of moving them
Closes 
2015-04-30 16:32:15 +12:00
Chris Wong
24e390047e Release 0.4.1 2015-04-13 20:42:47 +12:00
Chris Wong
86c6edafae Release 0.4.0 2015-04-11 10:26:43 +12:00
Chris Wong
fa28c39956 Release 0.3.4 2015-04-04 10:43:25 +13:00
Chris Wong
f08963012a Release 0.3.3 2015-04-03 16:30:43 +13:00
Chris Wong
df0689c7ed Release v0.3.2 2015-03-21 13:40:08 +13:00
Chris Wong
40612241f2 Release 0.3.1 2015-03-15 17:28:52 +13:00
Chris Wong
098e71468c Remove #[feature(io)]
I/O is stable now
2015-03-15 11:18:21 +13:00
Chris Wong
9586ebfa63 Release 0.3.0 2015-03-15 11:11:27 +13:00
Chris Wong
0170d76aa8 Add homepage to Cargo.toml 2015-03-15 11:10:06 +13:00