From 3c5b38097feb59cf6cd914b3efdc07c2c2bbf2a3 Mon Sep 17 00:00:00 2001 From: Ty Overby Date: Wed, 7 Feb 2018 19:46:00 -0800 Subject: [PATCH] hide with_deserializer and with_serializer --- src/config.rs | 4 ++++ src/lib.rs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/config.rs b/src/config.rs index b7be60a..cebd0be 100644 --- a/src/config.rs +++ b/src/config.rs @@ -285,6 +285,8 @@ impl Config { } /// Executes the acceptor with a serde::Deserializer instance. + /// NOT A PART OF THE STABLE PUBLIC API + #[doc(hidden)] pub fn with_deserializer<'a, A, R>(&self, reader: R, acceptor: A) -> A::Output where A: DeserializerAcceptor<'a>, R: BincodeRead<'a> @@ -296,6 +298,8 @@ impl Config { } /// Executes the acceptor with a serde::Serializer instance. + /// NOT A PART OF THE STABLE PUBLIC API + #[doc(hidden)] pub fn with_serializer(&self, writer: W, acceptor: A) -> A::Output where A: SerializerAcceptor, W: Write diff --git a/src/lib.rs b/src/lib.rs index 8a51c2b..b400b5f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -41,6 +41,7 @@ pub use de::read::BincodeRead; /// serde::Deserializer without knowing its concrete type. /// /// This trait should be used only for `with_deserializer` functions. +#[doc(hidden)] pub trait DeserializerAcceptor<'a> { /// The return type for the accept method type Output; @@ -52,6 +53,7 @@ pub trait DeserializerAcceptor<'a> { /// serde::Serializer without knowing its concrete type. /// /// This trait should be used only for `with_serializer` functions. +#[doc(hidden)] pub trait SerializerAcceptor { /// The return type for the accept method type Output; @@ -139,6 +141,8 @@ where } /// Executes the acceptor with a serde::Deserializer instance. +/// NOT A PART OF THE STABLE PUBLIC API +#[doc(hidden)] pub fn with_deserializer<'a, A, R>(reader: R, acceptor: A) -> A::Output where A: DeserializerAcceptor<'a>, R: BincodeRead<'a> @@ -147,6 +151,8 @@ where A: DeserializerAcceptor<'a>, } /// Executes the acceptor with a serde::Serializer instance. +/// NOT A PART OF THE STABLE PUBLIC API +#[doc(hidden)] pub fn with_serializer(writer: W, acceptor: A) -> A::Output where A: SerializerAcceptor, W: std::io::Write