/// Try to get the user's RCS id from the RCOS database and replace the root
/// identity with it.
/// Return true on success.
Try to get the user's RCS id from the RCOS database and replace the root
identity with it.
Return true on success.
Try to get the user ' s RCS id from the RCOS database and replace the root identity with it . Return true on success .
async fn replace_root_with_rpi_cas(&mut self) -> Result<bool, TelescopeError> {
        // Lookup the user's ID
        let user_id = self.get_user_id_or_error().await?;
        // Lookup the user's RCS id
        let rcs_id: Option<String> = AccountLookup::send(user_id, UserAccountType::Rpi).await?;
        // If there is an RCS id, replace the root.
        if let Some(rcs_id) = rcs_id {
            self.root = RootIdentity::RpiCas(RpiCasIdentity { rcs_id });
            return Ok(true);
        }
        // Return false if we could not replace the root with the user's RCS id.
        return Ok(false);
    }
async fn replace_root_with_rpi_cas ( & mut self ) -> Result < bool , TelescopeError > { // Lookup the user's ID let user_id = self . get_user_id_or_error ( ) . await ? ; // Lookup the user's RCS id let rcs_id : Option < String > = AccountLookup :: send ( user_id , UserAccountType :: Rpi ) . await ? ; // If there is an RCS id, replace the root. if let Some ( rcs_id ) = rcs_id { self . root = RootIdentity :: RpiCas ( RpiCasIdentity { rcs_id } ) ; return Ok ( true ) ; } // Return false if we could not replace the root with the user's RCS id. return Ok ( false ) ; }
Try to get the user's RCS id from the RCOS database and replace the root
identity with it.
Try to get the user ' s RCS id from the RCOS database and replace the root identity with it .
&mut self