summaryrefslogtreecommitdiff
path: root/dhall/src
diff options
context:
space:
mode:
authorNadrieril2019-04-10 19:25:13 +0200
committerNadrieril2019-04-10 19:25:13 +0200
commit3473b504645a0e1986f32b93b9cae93d5659c861 (patch)
treefd64d0d810bde10ed2f50e90ebf02c1174182be7 /dhall/src
parentff12918696181f1b0f2b8272944044e27c89e319 (diff)
Prepare for serde support
Diffstat (limited to 'dhall/src')
-rw-r--r--dhall/src/lib.rs1
-rw-r--r--dhall/src/serde.rs9
2 files changed, 10 insertions, 0 deletions
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs
index b49d1c1..2d44115 100644
--- a/dhall/src/lib.rs
+++ b/dhall/src/lib.rs
@@ -26,6 +26,7 @@ pub use crate::traits::SimpleStaticType;
pub use crate::traits::StaticType;
pub use dhall_generator::SimpleStaticType;
pub mod expr;
+pub mod serde;
pub fn from_str<'a, T: Deserialize<'a>>(
s: &'a str,
diff --git a/dhall/src/serde.rs b/dhall/src/serde.rs
new file mode 100644
index 0000000..278ea7a
--- /dev/null
+++ b/dhall/src/serde.rs
@@ -0,0 +1,9 @@
+use crate::expr::Type;
+use crate::traits::Deserialize;
+use crate::traits::Result;
+
+impl<'a, T: serde::Deserialize<'a>> Deserialize<'a> for T {
+ fn from_str(_s: &'a str, _ty: Option<&Type>) -> Result<Self> {
+ unimplemented!()
+ }
+}