mirror of
git://git.proxmox.com/git/perlmod.git
synced 2025-03-13 04:58:16 +03:00
make Serializer and Deserializer private
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
144831b5ae
commit
755df92f64
@ -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(|| {
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user