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
{{ message }}
This repository has been archived by the owner on Sep 13, 2018. It is now read-only.
structClient{transaction_id:u16}implServiceforClient{// type Request = ...// ...fncall(&self,req:Self::Request) -> Self::Future{self.transaction_id += 1;// <---- this does not work of course :(// ...}}
The text was updated successfully, but these errors were encountered:
Services are intended to be pure functions of request -> future of a response. If you want to track some state, you should use some sort of cell managing internal mutability. Service values are also intended to be Sync... (or at least will work better if they are).
Is there a reason for why the
Service
trait does not use a mutable reference toself
?tokio-service/src/lib.rs
Line 157 in c56afde
Let's say I'd like to modify a client struct:
The text was updated successfully, but these errors were encountered: