Lines Matching full:closed
10 /// Error returned by the `PollSender` when the channel is closed.
26 write!(fmt, "channel closed") in fmt()
37 Closed, enumerator
78 mem::replace(&mut self.state, State::Closed) in take_state()
93 /// If the channel is closed, an error will be returned. This is a permanent state.
108 // Channel is closed. in poll_reserve()
109 Poll::Ready(Err(e)) => (Some(Poll::Ready(Err(e))), State::Closed), in poll_reserve()
113 // We're closed, either by choice or because the underlying sender was closed. in poll_reserve()
114 s @ State::Closed => (Some(Poll::Ready(Err(PollSendError(None)))), s), in poll_reserve()
133 /// If the channel is closed, an error will be returned. This is a permanent state.
147 // We're closed, either by choice or because the underlying sender was closed. in send_item()
148 State::Closed => (Err(PollSendError(Some(value))), State::Closed), in send_item()
155 State::Closed in send_item()
160 /// Checks whether this sender is been closed.
164 matches!(self.state, State::Closed) || self.sender.is_none() in is_closed()
169 /// If `PollSender` has been closed, `None` is returned. The underlying channel that this sender
188 // Mark ourselves officially closed by dropping our main sender. in close()
191 // If we're already idle, closed, or we haven't yet reserved a slot, we can quickly in close()
192 // transition to the closed state. Otherwise, leave the existing permit in place for the in close()
195 State::Idle(_) => self.state = State::Closed, in close()
198 self.state = State::Closed; in close()
206 /// Returns `true` if a send was aborted. If the sender was closed prior to calling
207 /// `abort_send`, then the sender will remain in the closed state, otherwise the sender will be
210 // We may have been closed in the meantime, after a call to `poll_reserve` already in abort_send()
212 // closed state when we actually abort a send, rather than resetting ourselves back to idle. in abort_send()
220 // If we haven't closed yet, we have to clone our stored sender since we have no way in abort_send()
224 None => State::Closed, in abort_send()
228 // We got the permit. If we haven't closed yet, get the sender back. in abort_send()
233 State::Closed in abort_send()
252 None => (None, State::Closed), in clone()