edgedb-rust
edgedb-rust copied to clipboard
Iterator serialization support
This would offer greater flexibilty for serializing any array-like construct. For example, it would remove the need for intermediate allocations when transforming data before serializing it.
Unfortunately I don't think Rust coherence rules will allow that for QueryArg. But we may implement a derive with a flag, something like this:
#[derive(QueryArgs)]
struct MyArgs<'a> {
#[query_arg(array_like)]
queued_items: &'a Queue<String>,
}
Hello, by the way, do you have an example for
use edgedb_protocol::query_arg::QueryArgs;
#[derive(QueryArgs)]
struct MusicInput {
pub artist: String
}
cannot find derive macro QueryArgs in this scope
Or do I have to implement it myself ? but how do you encode each field?
Thank you!
Yes, we don't have that derive macro yet. It's in the to do list.