366ce470
—
Peter John 3 years ago
v0.3.0
- Cargo.lock +1 -1
- Cargo.toml +1 -1
- src/lib.rs +6 -0
Cargo.lock
CHANGED
|
@@ -1465,7 +1465,7 @@ dependencies = [
|
|
|
1465
1465
|
|
|
1466
1466
|
[[package]]
|
|
1467
1467
|
name = "tide-jsx"
|
|
1468
|
-
version = "0.
|
|
1468
|
+
version = "0.3.0"
|
|
1469
1469
|
dependencies = [
|
|
1470
1470
|
"async-std",
|
|
1471
1471
|
"pretty_assertions",
|
Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "tide-jsx"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
authors = ["pyrossh", "Gal Schlezinger <gal@spitfire.co.il>"]
|
|
5
5
|
edition = "2021"
|
|
6
6
|
description = "A safe and simple template engine with the ergonomics of JSX"
|
src/lib.rs
CHANGED
|
@@ -11,3 +11,9 @@ pub use fragment::Fragment;
|
|
|
11
11
|
pub use tide_jsx_impl::{component, html, rsx};
|
|
12
12
|
pub use simple_element::SimpleElement;
|
|
13
13
|
pub use text_element::Raw;
|
|
14
|
+
|
|
15
|
+
impl<'a, T: Render> From<SimpleElement<'a, T>> for tide::Response {
|
|
16
|
+
fn from(s: SimpleElement<T>) -> Self {
|
|
17
|
+
tide::Body::from_string(s.render()).into()
|
|
18
|
+
}
|
|
19
|
+
}
|