make Serializer and Deserializer private

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-11-26 13:29:34 +01:00
parent 144831b5ae
commit 755df92f64
2 changed files with 5 additions and 12 deletions

View File

@ -8,7 +8,7 @@ use crate::Value;
use crate::{array, ffi, hash};
/// Perl [`Value`](crate::Value) deserializer.
pub struct Deserializer {
struct Deserializer {
input: Value,
option_allowed: bool,
}
@ -31,13 +31,6 @@ impl Deserializer {
}
}
pub fn from_some_value(input: Value) -> Self {
Deserializer {
input,
option_allowed: false,
}
}
fn deref_current(&mut self) -> Result<(), Error> {
while let Value::Reference(_) = &self.input {
self.input = self.input.dereference().ok_or_else(|| {

View File

@ -7,7 +7,7 @@ use crate::Value;
use crate::{array, hash};
/// Perl [`Value`](crate::Value) serializer.
pub struct Serializer;
struct Serializer;
/// Serialize data into a perl [`Value`](crate::Value).
///
@ -21,18 +21,18 @@ where
}
/// Serde map & struct serialization helper.
pub struct SerHash {
struct SerHash {
hash: hash::Hash,
key: Option<Value>,
}
/// Serde sequence serialization helper.
pub struct SerArray {
struct SerArray {
array: array::Array,
}
/// Serde variant serialization helper.
pub struct SerVariant<T> {
struct SerVariant<T> {
hash: hash::Hash,
inner: T,
}