Help from trait

Hi all,
I want : get data from database, send it to a mobile app in JSON.

Im using diesel to get this vec: let all: Vec<(Subscription, Event)> = ...
Then all.into() to transform it in a SubscriptionsEventResponse
i dont know how to write these things ... i am stucked here:

(Subscription, Event) i dont know how to deal this tuple, i know how to handle only one struct.. :frowning:

Subscription and Event structs already exists...

impl From<(Subscription, Event)> for SubscriptionEventResponse {
    fn from(subscription: Subscription) -> Self {

impl From<Vec<(Subscription, Event)>> for SubscriptionsEventResponse {
    fn from(subscriptions: Vec<(Subscription, Event)>) -> Self {



It is unclear what you are asking. The Rust book talks about tuples here:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.