pub async fn load_session(&mut self, id: &str) -> BrokerResult<BridgeData> {
        assert!(self.session_id.is_empty());
        assert!(self.session_data.is_none());
        assert!(self.return_params.is_none());
        let Session { data, bridge_data } = self
            .app
            .store
            .send(GetSession {
                session_id: id.to_owned(),
            })
            .await
            .map_err(|e| BrokerError::Internal(format!("could not load a session: {}", e)))?
            .ok_or(BrokerError::SessionExpired)?;
        self.return_params = Some(data.return_params.clone());
        self.session_id = id.to_owned();
        self.session_data = Some(data);
        Ok(bridge_data)
    }
/// Load a session from storage.
Load a session from storage.
Load a session from storage .
pub async fn load_session(&mut self, id: &str) -> BrokerResult<BridgeData> {
        assert!(self.session_id.is_empty());
        assert!(self.session_data.is_none());
        assert!(self.return_params.is_none());
        let Session { data, bridge_data } = self
            .app
            .store
            .send(GetSession {
                session_id: id.to_owned(),
            })
            .await
            .map_err(|e| BrokerError::Internal(format!("could not load a session: {}", e)))?
            .ok_or(BrokerError::SessionExpired)?;
        self.return_params = Some(data.return_params.clone());
        self.session_id = id.to_owned();
        self.session_data = Some(data);
        Ok(bridge_data)
    }
pub async fn load_session ( & mut self , id : & str ) -> BrokerResult < BridgeData > { assert ! ( self session_id is_empty ( ) ) ; assert ! ( self session_data is_none ( ) ) ; assert ! ( self return_params is_none ( ) ) ; let Session { data , bridge_data } = self . app . store . send ( GetSession { session_id : id . to_owned ( ) , } ) . await . map_err ( | e | BrokerError :: Internal ( format ! ( " " e ) ) ) ? . ok_or ( BrokerError :: SessionExpired ) ? ; self . return_params = Some ( data . return_params . clone ( ) ) ; self . session_id = id . to_owned ( ) ; self . session_data = Some ( data ) ; Ok ( bridge_data ) }
Load a session from storage.
Load a session from storage .
&mut self
id
&str
&mut self
id
&str