summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2020-03-22 22:22:46 +0000
committerNadrieril2020-03-31 21:45:32 +0100
commit263fbebda7bc3c0f8c4497e1e508125ca91382f1 (patch)
treebbb224d63e99c61246c4795dd6db1f1a9f2553f9
parentf598e3612a854076b570bbc9c88abcdc1da528bd (diff)
Hide Value from API
-rw-r--r--serde_dhall/src/lib.rs4
-rw-r--r--serde_dhall/src/value.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/serde_dhall/src/lib.rs b/serde_dhall/src/lib.rs
index 8780682..c6c6bf9 100644
--- a/serde_dhall/src/lib.rs
+++ b/serde_dhall/src/lib.rs
@@ -174,8 +174,6 @@ doc_comment::doctest!("../../README.md");
/// Finer-grained control over deserializing Dhall values
pub mod options;
-/// Arbitrary Dhall values
-pub mod value;
mod deserialize;
mod error;
@@ -184,6 +182,8 @@ mod shortcuts;
/// Serde-compatible Dhall types
mod simple;
mod static_type;
+/// Dhall values
+mod value;
#[doc(hidden)]
pub use dhall_proc_macros::StaticType;
diff --git a/serde_dhall/src/value.rs b/serde_dhall/src/value.rs
index ed932f5..88727bc 100644
--- a/serde_dhall/src/value.rs
+++ b/serde_dhall/src/value.rs
@@ -4,8 +4,8 @@ use dhall::syntax::Expr;
use crate::simple::{SimpleType, SimpleValue};
use crate::{Deserialize, Error, Sealed};
+#[doc(hidden)]
/// An arbitrary Dhall value.
-/// TODO
#[derive(Debug, Clone)]
pub struct Value {
/// Invariant: in normal form
@@ -29,9 +29,9 @@ impl Value {
pub(crate) fn to_simple_value(&self) -> Option<SimpleValue> {
self.as_simple_val.clone()
}
+
/// Converts a Value into a SimpleType.
- /// TODO
- pub fn to_simple_type(&self) -> Option<SimpleType> {
+ pub(crate) fn to_simple_type(&self) -> Option<SimpleType> {
self.as_simple_ty.clone()
}