Commit Graph

38 Commits

Author SHA1 Message Date
Michael Pfaff d97885392b Silence unused_macros on render_tuple! 2024-03-14 23:02:19 -04:00
Michael Pfaff 19a740f26c impl RenderOnce on tuples of up to 8 values 2024-03-14 23:01:39 -04:00
Michael Pfaff 4e2232f2de Unify Render* and Template* traits 2024-03-11 17:33:11 -04:00
Michael Pfaff e5a471d9ca Improve API 2024-03-11 16:57:52 -04:00
Kogia-sima 25fed05519 test: improve test coverage for runtime 2020-12-29 04:51:08 +09:00
Kogia-sima 2d6b29da6f test: Add more tests 2020-12-29 01:32:56 +09:00
Kogia-sima d127eba2ee fix: Fix compilation issue with Cow<'a, str> 2020-12-21 17:02:32 +09:00
Kogia-sima 8deecff5fe break: change RenderError into enum 2020-12-20 21:55:55 +09:00
Kogia-sima 8cc19b72b8 doc: Document unsafety of Render trait 2020-12-20 16:31:04 +09:00
Kogia-sima aa0afb1f81 doc: Update safety documents
and some assertion fix
2020-12-16 21:17:06 +09:00
Kogia-sima c7093a727a perf: Replace reserve with reserve_small 2020-12-16 15:18:04 +09:00
Kogia-sima 80b64fe883 break: Remove Buffer::set_len method
This method allows reducing the buffer size, but it should not be
possible.
Alternatively I added a Buffer::advance method to increase the length.
2020-07-15 19:49:35 +09:00
Kogia-sima 869c58dcb1 Use UFCS instead of receiver coecions
This change is required to achieve filter
2020-07-15 00:06:01 +09:00
Kogia-sima e277fe4a7d Add more tests for runtime 2020-07-14 18:38:38 +09:00
Kogia-sima 5d874e44ea doc: update doc comments 2020-07-11 17:10:23 +09:00
Kogia-sima b4903f2b3d refactor: Add utils.rs 2020-07-11 04:23:39 +09:00
Kogia-sima 5cef362dbd Add more debug assertions 2020-07-11 02:39:04 +09:00
Kogia-sima 3043719d35 Fix default implementation of Render::render_escaped 2020-07-10 00:32:58 +09:00
Kogia-sima 7d0538b244 Fix HTML escaping in char rendering 2020-07-10 00:30:25 +09:00
Kogia-sima 6ab65f4247 Use itoap crate to render integers 2020-07-08 22:26:47 +09:00
Kogia-sima 36be07bbc7 More compiler hints 2020-07-05 13:25:57 +09:00
Kogia-sima ea080e8a6c impl Render for u128/i128 2020-06-20 21:21:51 +09:00
Kogia-sima be293c8f90 Update doc comments 2020-06-19 15:40:30 +09:00
Kogia-sima 7c97d4e0ff Speedup floating point formatting 2020-06-18 17:51:59 +09:00
Kogia-sima 0cfcb14624 refactor: Rename private trait method 2020-06-16 22:27:08 +09:00
Kogia-sima 9e2952d92d Add Buffer::render_internal method to speedup reserve method 2020-06-16 20:00:35 +09:00
Kogia-sima 8a83c2e278 Avoid method name collision in render* macros
fix #9
2020-06-13 13:16:39 +09:00
Kogia-sima d302f30144 Format code 2020-06-11 19:42:22 +09:00
Kogia-sima 6dea4793ab Add some tests for runtime 2020-06-11 19:02:28 +09:00
Kogia-sima c5a311e8c6 Use integer module to render integer 2020-06-10 18:41:12 +09:00
Kogia-sima 95e707152a Return Result<(), RenderError> in `Render` trait methods 2020-06-09 22:49:44 +09:00
Kogia-sima cd1b286f1b Rename some Buffer's methods
- Buffer::write_str => Buffer::push_str
- Buffer::write_char => Buffer::push
2020-06-09 22:38:24 +09:00
Kogia-sima 7848f34e37 impl Render for bool 2020-06-08 20:24:28 +09:00
Kogia-sima 3f727b0451 Add receiver coercion test 2020-06-07 23:14:54 +09:00
Kogia-sima e19ef51f39 Suppress unused import warning 2020-06-07 21:12:02 +09:00
Kogia-sima e12e42e15a Remove `impl<T: Display> Render for &T`
This specialization should be discussed more deeply. This specialization
is very useful when you want to render the non-specialized types such as
url::Url. However, when you write a reference type inside templates,
that fallbacks to non-specialized call, which is slower than specialized
call.
2020-06-07 18:57:51 +09:00
Kogia-sima 6ee8f147a2 Add minimal documents for sailfish 2020-06-06 19:25:15 +09:00
Kogia-sima 08dacdd263 Add source code 2020-06-05 22:31:38 +09:00