/// Run through the registration process of a new `Profile`.
Run through the registration process of a new `Profile`.
Run through the registration process of a new ` Profile ` .
pub async fn complete_registration(&mut self) {
            while let Some(request) = self.stream.next().await {
                match request {
                    Ok(bredr::ProfileRequest::Advertise { receiver, responder, .. }) => {
                        if self.is_registration_complete() {
                            panic!("unexpected second advertise request");
                        }
                        self.responder = Some(responder);
                        self.receiver = Some(receiver.into_proxy().unwrap());
                        if self.is_registration_complete() {
                            break;
                        }
                    }
                    Ok(bredr::ProfileRequest::Search { results, .. }) => {
                        if self.is_registration_complete() {
                            panic!("unexpected second search request");
                        }
                        self.results = Some(results.into_proxy().unwrap());
                        if self.is_registration_complete() {
                            break;
                        }
                    }
                    _ => panic!("unexpected result on profile request stream: {:?}", request),
                }
            }
        }
pub async fn complete_registration ( & mut self ) { while let Some ( request ) = self . stream . next ( ) . await { match request { Ok ( bredr :: ProfileRequest :: Advertise { receiver , responder , .. } ) => { if self . is_registration_complete ( ) { panic ! ( " " ) ; } self . responder = Some ( responder ) ; self . receiver = Some ( receiver . into_proxy ( ) . unwrap ( ) ) ; if self . is_registration_complete ( ) { break ; } } Ok ( bredr :: ProfileRequest :: Search { results , .. } ) => { if self . is_registration_complete ( ) { panic ! ( " " ) ; } self . results = Some ( results . into_proxy ( ) . unwrap ( ) ) ; if self . is_registration_complete ( ) { break ; } } _ => panic ! ( " " request ) , } } }
Run through the registration process of a new `Profile`.
Run through the registration process of a new ` Profile ` .
&mut self