hide with_deserializer and with_serializer

This commit is contained in:
Ty Overby 2018-02-07 19:46:00 -08:00
parent 76b7662dcd
commit 3c5b38097f
2 changed files with 10 additions and 0 deletions

View File

@ -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<A, W>(&self, writer: W, acceptor: A) -> A::Output
where A: SerializerAcceptor,
W: Write

View File

@ -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<A, W>(writer: W, acceptor: A) -> A::Output
where A: SerializerAcceptor,
W: std::io::Write