serialize tuple enums with single element directly as the value instead of a sequence

This commit is contained in:
Oliver Schneider committed 2015-07-24 09:10:58 +02:00
1 parent 5885111863
commit 24787195a1
8 files changed
+94 -4

No files matched your search

+8
View File
@@ -125,6 +125,14 @@ pub trait Serializer {
self.visit_unit()
}
#[inline]
fn visit_enum_simple<T>(&mut self,
_name: &str,
_variant: &str,
_value: T,
) -> Result<(), Self::Error>
where T: Serialize;
fn visit_none(&mut self) -> Result<(), Self::Error>;
fn visit_some<V>(&mut self, value: V) -> Result<(), Self::Error>