pub async fn save_session(&mut self, bridge_data: BridgeData) -> BrokerResult<bool> {
        let data = match self.session_data.take() {
            Some(data) => data,
            None => return Ok(false),
        };
        self.app
            .store
            .send(SaveSession {
                session_id: self.session_id.clone(),
                data: Session { data, bridge_data },
            })
            .await
            .map_err(|e| BrokerError::Internal(format!("could not save a session: {}", e)))?;
        Ok(true)
    }
/// Try to save the session with the given bridge data.
///
/// Will return `false` if the session was not started, which will also happen if another
/// provider has already claimed the session.
Try to save the session with the given bridge data.
Will return `false` if the session was not started, which will also happen if another
provider has already claimed the session.
Try to save the session with the given bridge data . Will return ` false ` if the session was not started which will also happen if another provider has already claimed the session .
pub async fn save_session(&mut self, bridge_data: BridgeData) -> BrokerResult<bool> {
        let data = match self.session_data.take() {
            Some(data) => data,
            None => return Ok(false),
        };
        self.app
            .store
            .send(SaveSession {
                session_id: self.session_id.clone(),
                data: Session { data, bridge_data },
            })
            .await
            .map_err(|e| BrokerError::Internal(format!("could not save a session: {}", e)))?;
        Ok(true)
    }
pub async fn save_session ( & mut self , bridge_data : BridgeData ) -> BrokerResult < bool > { let data = match self . session_data . take ( ) { Some ( data ) => data , None => return Ok ( false ) , } ; self . app . store . send ( SaveSession { session_id : self . session_id . clone ( ) , data : Session { data , bridge_data } , } ) . await . map_err ( | e | BrokerError :: Internal ( format ! ( " " e ) ) ) ? ; Ok ( true ) }
Try to save the session with the given bridge data.
Try to save the session with the given bridge data .
&mut self
bridge_data
BridgeData
&mut self
bridge_data
BridgeData