Aah I thought this crate was exactly what I wanted but unfortunately it isn't due to a very minor detail... I was looking for ContentDeserializer, not ContentRefDeserializer: I only need to attempt deserialization once, but it needs to be buffered (because I need to inspect the data and possibly create a value if deserializer says sequence is complete, before passing it to a DeserializeSeed, and there's no other path than the Content buffer because next_element_seed takes seed owned so when that gives back None I've lost my seed ^^').
And so this seems sad, because it forces a reallocation:
|
Content::String(ref v) => visitor.visit_str(v), |
Do you think it would make sense to have ContentDeserializer in this crate as well? (But then crate name is sad. π
)
Aah I thought this crate was exactly what I wanted but unfortunately it isn't due to a very minor detail... I was looking for
ContentDeserializer, notContentRefDeserializer: I only need to attempt deserialization once, but it needs to be buffered (because I need to inspect the data and possibly create a value if deserializer says sequence is complete, before passing it to aDeserializeSeed, and there's no other path than theContentbuffer becausenext_element_seedtakesseedowned so when that gives backNoneI've lost my seed ^^').And so this seems sad, because it forces a reallocation:
serde-content-ref/src/de.rs
Line 114 in fa1e323
Do you think it would make sense to have
ContentDeserializerin this crate as well? (But then crate name is sad. π )