Update a session
(&mut self, session: Session)
| 1101 | |
| 1102 | /// Update a session |
| 1103 | pub fn update(&mut self, session: Session) { |
| 1104 | let id = session.id.clone(); |
| 1105 | self.sessions.insert(id, session.clone()); |
| 1106 | self.events.push(SessionEvent::Updated { |
| 1107 | info: session.clone(), |
| 1108 | }); |
| 1109 | self.publish_session_event(&SESSION_UPDATED_EVENT, &session); |
| 1110 | } |
| 1111 | |
| 1112 | /// Get events (and clear them) |
| 1113 | pub fn drain_events(&mut self) -> Vec<SessionEvent> { |
nothing calls this directly
no test coverage detected