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
Currently QueryArg's definition is pretty opaque and how an implementor is supposed to implement encode_slot and check_descriptor is undocumented, and a user is mostly expected to use this trait through the derive macros. However using derive macros is not possible when the types are defined in another crate. This requires you to duplicate the type definition in your own crate and write a From conversion. This approach is not scalable and hinders the ability to use EdgeDB with types in the Rust ecosystem.
I don't have all the context on why these traits are defined like this, but looking at the source it seems like it's leaking some encoder specific details that aren't relevant for users. It would be great if the implementations of these traits could be simplified into a codec model like serde so that users could easily write their own manual implementations.
Currently
QueryArg
's definition is pretty opaque and how an implementor is supposed to implementencode_slot
andcheck_descriptor
is undocumented, and a user is mostly expected to use this trait through the derive macros. However using derive macros is not possible when the types are defined in another crate. This requires you to duplicate the type definition in your own crate and write aFrom
conversion. This approach is not scalable and hinders the ability to use EdgeDB with types in the Rust ecosystem.I don't have all the context on why these traits are defined like this, but looking at the source it seems like it's leaking some encoder specific details that aren't relevant for users. It would be great if the implementations of these traits could be simplified into a codec model like
serde
so that users could easily write their own manual implementations.The text was updated successfully, but these errors were encountered: