Update the entry. This is a no-op if the session has been removed. Other instances of the session may see the updated value after a delay and the value needs to be re-acquired.
(&self, value: T)
| 51 | /// Other instances of the session may see the updated value after a delay and the value needs |
| 52 | /// to be re-acquired. |
| 53 | pub async fn update(&self, value: T) |
| 54 | where |
| 55 | T: Send + Sync, |
| 56 | { |
| 57 | let value = Arc::new(value); |
| 58 | |
| 59 | let entry = self.storage.storage.entry_async(self.key).await; |
| 60 | |
| 61 | if let Entry::Occupied(entry) = entry { |
| 62 | entry.update(value); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /// Try to re-acquire the session value. |
| 67 | /// |
no outgoing calls
no test coverage detected