pub async fn new() -> Result<Self, Error> {
        START.call_once(|| {
            fuchsia_syslog::init_with_tags(&["shortcut"])
                .expect("shortcut syslog init should not fail");
        });

        let registry = connect_to_protocol::<ui_shortcut::RegistryMarker>()
            .context("Failed to connect to Shortcut registry service")?;

        let (listener_client_end, listener) =
            fidl::endpoints::create_request_stream::<ui_shortcut::ListenerMarker>()?;

        // Set listener and view ref.
        let view_ref = scenic::ViewRefPair::new()?.view_ref;
        registry
            .set_view(&mut fuchsia_scenic::duplicate_view_ref(&view_ref)?, listener_client_end)?;

        Ok(Self { registry, listener, view_ref })
    }
/// Creates the instance of the test helper and connects to shortcut registry service.
Creates the instance of the test helper and connects to shortcut registry service.
Creates the instance of the test helper and connects to shortcut registry service .
pub async fn new() -> Result<Self, Error> {
        START.call_once(|| {
            fuchsia_syslog::init_with_tags(&["shortcut"])
                .expect("shortcut syslog init should not fail");
        });
        let registry = connect_to_protocol::<ui_shortcut::RegistryMarker>()
            .context("Failed to connect to Shortcut registry service")?;
        let (listener_client_end, listener) =
            fidl::endpoints::create_request_stream::<ui_shortcut::ListenerMarker>()?;
        // Set listener and view ref.
        let view_ref = scenic::ViewRefPair::new()?.view_ref;
        registry
            .set_view(&mut fuchsia_scenic::duplicate_view_ref(&view_ref)?, listener_client_end)?;
        Ok(Self { registry, listener, view_ref })
    }
pub async fn new ( ) -> Result < Self , Error > { START . call_once ( | | { fuchsia_syslog :: init_with_tags ( & [ " " ] ) . expect ( " " ) ; } ) ; let registry = connect_to_protocol :: < ui_shortcut :: RegistryMarker > ( ) . context ( " " ) ? ; let ( listener_client_end , listener ) = fidl :: endpoints :: create_request_stream :: < ui_shortcut :: ListenerMarker > ( ) ? ; // Set listener and view ref. let view_ref = scenic :: ViewRefPair :: new ( ) ? . view_ref ; registry . set_view ( & mut fuchsia_scenic :: duplicate_view_ref ( & view_ref ) ? , listener_client_end ) ? ; Ok ( Self { registry , listener , view_ref } ) }
Creates the instance of the test helper and connects to shortcut registry service.
Creates the instance of the test helper and connects to shortcut registry service .