-
Notifications
You must be signed in to change notification settings - Fork 19
Serde
Finn Bear edited this page Sep 24, 2024
·
3 revisions
A serde
integration is gated behind the "serde"
feature flag. It is slower, produces
slightly larger output, and (by extension) is not compatible with the native
bitcode::{Encode, Decode}
.
-
enum
's with#[serde(untagged)]
. - Fields with
#[serde(skip_serializing_if = ...)]
,#[serde(default)]
, etc. - Types like
serde_json::Value
, which internally serialize different types (numbers, arrays, etc.) without a normal enum discriminant.
- The
serde
version omits theflowinfo
andscope_id
fields ofstd::net::SocketAddrV6
, but nativebitcode
keeps them.