pub fn connect_to_service<S: DiscoverableService>(&self) -> Result<S::Proxy, Error> {
        let svc_dir_proxy = self
            .namespace
            .get(&"/svc".to_string())
            .ok_or(format_err!("the mock's namespace doesn't have a /svc directory"))?;
        let node_proxy = io_util::open_node(
            svc_dir_proxy,
            Path::new(S::SERVICE_NAME),
            fio::OPEN_RIGHT_READABLE | fio::OPEN_RIGHT_WRITABLE,
            fio::MODE_TYPE_SERVICE,
        )?;
        Ok(S::Proxy::from_channel(node_proxy.into_channel().unwrap()))
    }
/// Connects to a FIDL protocol and returns a proxy to that protocol.
Connects to a FIDL protocol and returns a proxy to that protocol.
Connects to a FIDL protocol and returns a proxy to that protocol .
pub fn connect_to_service<S: DiscoverableService>(&self) -> Result<S::Proxy, Error> {
        let svc_dir_proxy = self
            .namespace
            .get(&"/svc".to_string())
            .ok_or(format_err!("the mock's namespace doesn't have a /svc directory"))?;
        let node_proxy = io_util::open_node(
            svc_dir_proxy,
            Path::new(S::SERVICE_NAME),
            fio::OPEN_RIGHT_READABLE | fio::OPEN_RIGHT_WRITABLE,
            fio::MODE_TYPE_SERVICE,
        )?;
        Ok(S::Proxy::from_channel(node_proxy.into_channel().unwrap()))
    }
pub fn connect_to_service < S : DiscoverableService > ( & self ) -> Result < S :: Proxy , Error > { let svc_dir_proxy = self . namespace . get ( & " " . to_string ( ) ) . ok_or ( format_err ! ( " " ) ) ? ; let node_proxy = io_util :: open_node ( svc_dir_proxy , Path :: new ( S :: SERVICE_NAME ) , fio :: OPEN_RIGHT_READABLE | fio :: OPEN_RIGHT_WRITABLE , fio :: MODE_TYPE_SERVICE , ) ? ; Ok ( S :: Proxy :: from_channel ( node_proxy . into_channel ( ) . unwrap ( ) ) ) }
Connects to a FIDL protocol and returns a proxy to that protocol.
Connects to a FIDL protocol and returns a proxy to that protocol .
&self
&self