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
121 mem::replace(&mut self.state, State::Closed) in take_state()
136 /// If the channel is closed, an error will be returned. This is a permanent state.
151 // Channel is closed. in poll_reserve()
152 Poll::Ready(Err(e)) => (Some(Poll::Ready(Err(e))), State::Closed), in poll_reserve()
156 // We're closed, either by choice or because the underlying sender was closed. in poll_reserve()
157 s @ State::Closed => (Some(Poll::Ready(Err(PollSendError(None)))), s), in poll_reserve()
176 /// If the channel is closed, an error will be returned. This is a permanent state.
190 // We're closed, either by choice or because the underlying sender was closed. in send_item()
191 State::Closed => (Err(PollSendError(Some(value))), State::Closed), in send_item()
198 State::Closed in send_item()
203 /// Checks whether this sender is been closed.
207 matches!(self.state, State::Closed) || self.sender.is_none() in is_closed()
212 /// If `PollSender` has been closed, `None` is returned. The underlying channel that this sender
231 // Mark ourselves officially closed by dropping our main sender. in close()
234 // If we're already idle, closed, or we haven't yet reserved a slot, we can quickly in close()
235 // transition to the closed state. Otherwise, leave the existing permit in place for the in close()
238 State::Idle(_) => self.state = State::Closed, in close()
241 self.state = State::Closed; in close()
249 /// Returns `true` if a send was aborted. If the sender was closed prior to calling
250 /// `abort_send`, then the sender will remain in the closed state, otherwise the sender will be
253 // We may have been closed in the meantime, after a call to `poll_reserve` already in abort_send()
255 // closed state when we actually abort a send, rather than resetting ourselves back to idle. in abort_send()
263 // If we haven't closed yet, we have to clone our stored sender since we have no way in abort_send()
267 None => State::Closed, in abort_send()
271 // We got the permit. If we haven't closed yet, get the sender back. in abort_send()
276 State::Closed in abort_send()
295 None => (None, State::Closed), in clone()