From e7e79bf32c385fa8c30a45be262ca3d6d8f1f653 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 13 Apr 2019 00:44:58 +0200 Subject: Document all of the API Closes #64 --- dhall/src/traits/deserialize.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dhall/src/traits/deserialize.rs') diff --git a/dhall/src/traits/deserialize.rs b/dhall/src/traits/deserialize.rs index f1be054..e2e0b05 100644 --- a/dhall/src/traits/deserialize.rs +++ b/dhall/src/traits/deserialize.rs @@ -1,7 +1,14 @@ use crate::error::*; use crate::expr::*; +/// A data structure that can be deserialized from a Dhall expression +/// +/// This is automatically implemented for any type that [serde][serde] +/// can deserialize. +/// +/// This trait cannot be implemented manually. pub trait Deserialize<'a>: Sized { + /// See [dhall::from_str][crate::from_str] fn from_str(s: &'a str, ty: Option<&Type>) -> Result; } -- cgit v1.2.3