pub async fn bind_instance_and_open<'a>(
        &'a self,
        realm: Arc<Realm>,
        flags: u32,
        open_mode: u32,
        path: &'a CapabilityPath,
        server_chan: zx::Channel,
    ) -> Result<(), ModelError> {
        let eager_children = {
            let eager_children = await!(self.bind_instance(realm.clone()))?;

            let server_end = ServerEnd::new(server_chan);
            let state = await!(realm.instance.state.lock());
            let out_dir = &state
                .execution
                .as_ref()
                .ok_or(ModelError::capability_discovery_error(format_err!(
                    "component hosting capability isn't running: {}",
                    realm.abs_moniker
                )))?
                .outgoing_dir;
            let path = io_util::canonicalize_path(&path.to_string());
            out_dir.open(flags, open_mode, &path, server_end).expect("failed to send open message");
            eager_children
        };
        await!(self.bind_eager_children_recursive(eager_children))?;
        Ok(())
    }
/// Given a realm and path, lazily bind to the instance in the realm, open, then bind its eager
/// children.
Given a realm and path, lazily bind to the instance in the realm, open, then bind its eager
children.
Given a realm and path lazily bind to the instance in the realm open then bind its eager children .
pub async fn bind_instance_and_open<'a>(
        &'a self,
        realm: Arc<Realm>,
        flags: u32,
        open_mode: u32,
        path: &'a CapabilityPath,
        server_chan: zx::Channel,
    ) -> Result<(), ModelError> {
        let eager_children = {
            let eager_children = await!(self.bind_instance(realm.clone()))?;
            let server_end = ServerEnd::new(server_chan);
            let state = await!(realm.instance.state.lock());
            let out_dir = &state
                .execution
                .as_ref()
                .ok_or(ModelError::capability_discovery_error(format_err!(
                    "component hosting capability isn't running: {}",
                    realm.abs_moniker
                )))?
                .outgoing_dir;
            let path = io_util::canonicalize_path(&path.to_string());
            out_dir.open(flags, open_mode, &path, server_end).expect("failed to send open message");
            eager_children
        };
        await!(self.bind_eager_children_recursive(eager_children))?;
        Ok(())
    }
pub async fn bind_instance_and_open < ' a > ( & ' a self , realm : Arc < Realm > , flags : u32 , open_mode : u32 , path : & ' a CapabilityPath , server_chan : zx :: Channel , ) -> Result < ( ) , ModelError > { let eager_children = { let eager_children = await ! ( self bind_instance ( realm clone ( ) ) ) ? ; let server_end = ServerEnd :: new ( server_chan ) ; let state = await ! ( realm instance state lock ( ) ) ; let out_dir = & state . execution . as_ref ( ) . ok_or ( ModelError :: capability_discovery_error ( format_err ! ( " " realm abs_moniker ) ) ) ? . outgoing_dir ; let path = io_util :: canonicalize_path ( & path . to_string ( ) ) ; out_dir . open ( flags , open_mode , & path , server_end ) . expect ( " " ) ; eager_children } ; await ! ( self bind_eager_children_recursive ( eager_children ) ) ? ; Ok ( ( ) ) }
Given a realm and path, lazily bind to the instance in the realm, open, then bind its eager
children.
Given a realm and path lazily bind to the instance in the realm open then bind its eager children .
&'a self
realm
Arc<Realm>
flags
u32
open_mode
u32
path
&'a CapabilityPath
server_chan
zx::Channel
&'a self
realm
Arc<Realm>
flags
u32
open_mode
u32
path
&'a CapabilityPath
server_chan
zx::Channel