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
I am currently using sqlx to query data into a struct using query_as! which uses a Cow<'a, str> instead of a String. Apparently the query_as! macro does not support structures with lifetimes while the query_as function does. Why is that? Is this behavior documented somewhere?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am currently using sqlx to query data into a struct using
query_as!
which uses aCow<'a, str>
instead of aString
. Apparently thequery_as!
macro does not support structures with lifetimes while thequery_as
function does. Why is that? Is this behavior documented somewhere?Thanks in advance :)
Beta Was this translation helpful? Give feedback.
All reactions