fn inc_num_messages(&self) -> Option<usize> {
        let mut curr = self.inner.state.load(SeqCst);
        loop {
            let mut state = decode_state(curr);
            if !state.is_open {
                return None;
            }
            state.num_messages += 1;

            let next = encode_state(&state);
            match self
                .inner
                .state
                .compare_exchange(curr, next, SeqCst, SeqCst)
            {
                Ok(_) => {
                    return Some(state.num_messages);
                }
                Err(actual) => curr = actual,
            }
        }
    }
// Increment the number of queued messages. Returns if the sender should
// block.
Increment the number of queued messages. Returns if the sender should
block.
Increment the number of queued messages . Returns if the sender should block .
fn inc_num_messages(&self) -> Option<usize> {
        let mut curr = self.inner.state.load(SeqCst);
        loop {
            let mut state = decode_state(curr);
            if !state.is_open {
                return None;
            }
            state.num_messages += 1;
            let next = encode_state(&state);
            match self
                .inner
                .state
                .compare_exchange(curr, next, SeqCst, SeqCst)
            {
                Ok(_) => {
                    return Some(state.num_messages);
                }
                Err(actual) => curr = actual,
            }
        }
    }
fn inc_num_messages ( & self ) -> Option < usize > { let mut curr = self . inner . state . load ( SeqCst ) ; loop { let mut state = decode_state ( curr ) ; if ! state . is_open { return None ; } state . num_messages += 1 ; let next = encode_state ( & state ) ; match self . inner . state . compare_exchange ( curr , next , SeqCst , SeqCst ) { Ok ( _ ) => { return Some ( state . num_messages ) ; } Err ( actual ) => curr = actual , } } }
Increment the number of queued messages.
Increment the number of queued messages .
&self
&self