mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-11-22 14:29:55 +00:00
serialize tuple enums with single element directly as the value instead of a sequence
This commit is contained in:
1 parent
5885111863
commit
24787195a1
8 files changed
+94
-4
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user