postcard-schema
: how to handle schemas conditional on is_human_readable()
#197
Labels
postcard-schema
Related to the postcard-schema crate
Some
Serialize
/Deserialize
implementations (see e.g.uuid::Uuid
) use different serde data model representations of the type depending on whether the underlyingSerializer
/Deserializer
is human readable. For the most part,postcard
should be able to think only in terms of the non-human-readable representation, but the distinction may matter forpostcard-dyn
in order to properly deserialize from human readable formats or serialize to human readable formats (e.g., json).This could be captured in the schema as something like an
IfHumanReadable { then: Type, else: Type }
schema variant, though that feels somewhat clunky.The text was updated successfully, but these errors were encountered: