pub fn create_channel(&self, rights: Rights) -> ZxResult<Arc<Channel>> {
        let mut inner = self.inner.lock();
        match &*inner {
            ExceptionateInner::Shutdown => return Err(ZxError::BAD_STATE),
            ExceptionateInner::Bind { channel, .. } if channel.peer().is_ok() => {
                // already has a valid channel
                return Err(ZxError::ALREADY_BOUND);
            }
            _ => {}
        }
        let (channel, user_channel) = Channel::create();
        *inner = ExceptionateInner::Bind { channel, rights };
        Ok(user_channel)
    }
/// Create an exception channel endpoint for user.
Create an exception channel endpoint for user.
Create an exception channel endpoint for user .
pub fn create_channel(&self, rights: Rights) -> ZxResult<Arc<Channel>> {
        let mut inner = self.inner.lock();
        match &*inner {
            ExceptionateInner::Shutdown => return Err(ZxError::BAD_STATE),
            ExceptionateInner::Bind { channel, .. } if channel.peer().is_ok() => {
                // already has a valid channel
                return Err(ZxError::ALREADY_BOUND);
            }
            _ => {}
        }
        let (channel, user_channel) = Channel::create();
        *inner = ExceptionateInner::Bind { channel, rights };
        Ok(user_channel)
    }
pub fn create_channel ( & self , rights : Rights ) -> ZxResult < Arc < Channel > > { let mut inner = self . inner . lock ( ) ; match & * inner { ExceptionateInner :: Shutdown => return Err ( ZxError :: BAD_STATE ) , ExceptionateInner :: Bind { channel , .. } if channel . peer ( ) . is_ok ( ) => { // already has a valid channel return Err ( ZxError :: ALREADY_BOUND ) ; } _ => { } } let ( channel , user_channel ) = Channel :: create ( ) ; * inner = ExceptionateInner :: Bind { channel , rights } ; Ok ( user_channel ) }
Create an exception channel endpoint for user.
Create an exception channel endpoint for user .
&self
rights
Rights
&self
rights
Rights