Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Put value serializer data structures next to impls
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 13, 2022
1 parent c4b40a2 commit a16e1ad
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/value/ser.rs
Expand Up @@ -251,25 +251,6 @@ pub struct SerializeArray {
sequence: Sequence,
}

pub struct SerializeTupleVariant {
tag: &'static str,
sequence: Sequence,
}

pub struct SerializeMap {
mapping: Mapping,
next_key: Option<Value>,
}

pub struct SerializeStruct {
mapping: Mapping,
}

pub struct SerializeStructVariant {
tag: &'static str,
mapping: Mapping,
}

impl ser::SerializeSeq for SerializeArray {
type Ok = Value;
type Error = Error;
Expand Down Expand Up @@ -319,6 +300,11 @@ impl ser::SerializeTupleStruct for SerializeArray {
}
}

pub struct SerializeTupleVariant {
tag: &'static str,
sequence: Sequence,
}

impl ser::SerializeTupleVariant for SerializeTupleVariant {
type Ok = Value;
type Error = Error;
Expand All @@ -339,6 +325,11 @@ impl ser::SerializeTupleVariant for SerializeTupleVariant {
}
}

pub struct SerializeMap {
mapping: Mapping,
next_key: Option<Value>,
}

impl ser::SerializeMap for SerializeMap {
type Ok = Value;
type Error = Error;
Expand Down Expand Up @@ -376,6 +367,10 @@ impl ser::SerializeMap for SerializeMap {
}
}

pub struct SerializeStruct {
mapping: Mapping,
}

impl ser::SerializeStruct for SerializeStruct {
type Ok = Value;
type Error = Error;
Expand All @@ -393,6 +388,11 @@ impl ser::SerializeStruct for SerializeStruct {
}
}

pub struct SerializeStructVariant {
tag: &'static str,
mapping: Mapping,
}

impl ser::SerializeStructVariant for SerializeStructVariant {
type Ok = Value;
type Error = Error;
Expand Down

0 comments on commit a16e1ad

Please sign in to comment.