cannot borrow data in dereference of tokio::sync::RwLockReadGuard<'_, PooledConnection<'_, MemcacheConnectionManager>> as mutable
trait DerefMut is required to modify through a dereference, but it is not implemented for tokio::sync::RwLockReadGuard<'_, PooledConnection<'_, MemcacheConnectionManager>>rustcE0596
I have searched a lot of approaches but in rust such pattern is not allowed. I wish to proceed with such approach where we keep the connection open for better latency numbers. At the moment only memcache-async (ascii) is viable but facing the connection issue. Any help would be appreciated.
Hmm, I can't seem to find how that method would be available from your PooledConnection. In any case, you're storing CONN in a RwLock, so you'll want to use CONN.write() instead of CONN.read() to obtain a mutable guard.