You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing which might be worth thinking about is whether the difference in data model allow deser to implement Spanned,
In the following comment dtolnay says serde's model is not necessarily byte oriented. serde-rs/serde#1811 (comment)
if deser's model is, perhaps it could be worth including.
A few serde serializer/deserializer implementations implement it directly.
But even with these, there are for instance odd interactions with Default.
Presumably a span for a default element could be one of None for an optional span type, or alternately the Span of any enclosing element?
Anyhow, it seemed worth thinking about perhaps, but doesn't seem to be essential.
The text was updated successfully, but these errors were encountered:
The idea originally was that you can do things like Spanned through the context interface by using standardized types to attach information from the deserializer into the deserialization system. Unfortunately what I'm noticing as part of the existing implementation is that this is expensive with dynamic dispatch and I have not found a good way around this yet.
I do not want to give up on type erasure and dynamic dispatch yet, but I kinda ran into challenges with that which is why this has slowed down a bit right now.
One thing which might be worth thinking about is whether the difference in data model allow deser to implement
Spanned
,In the following comment dtolnay says serde's model is not necessarily byte oriented.
serde-rs/serde#1811 (comment)
if deser's model is, perhaps it could be worth including.
A few serde serializer/deserializer implementations implement it directly.
https://crates.io/crates/json-spanned-value
https://docs.rs/toml/latest/toml/struct.Spanned.html
But even with these, there are for instance odd interactions with
Default
.Presumably a span for a default element could be one of None for an optional span type, or alternately the Span of any enclosing element?
Anyhow, it seemed worth thinking about perhaps, but doesn't seem to be essential.
The text was updated successfully, but these errors were encountered: