(&self, value: T)
| 81 | /// is available to receive messages. |
| 82 | #[expect(clippy::missing_panics_doc, reason = "not handling poisoned mutex")] |
| 83 | pub fn send(&self, value: T) -> Result<(), SendError<T>> { |
| 84 | let mut guard = self.inner.lock().unwrap(); |
| 85 | if guard.receiver_dropped { |
| 86 | return Err(BufferClosedError.into()); |
| 87 | } |
| 88 | if let Some(Side::Receiver) = guard.disruption_handled { |
| 89 | return Err(SendError::Disrupted(value)); |
| 90 | } |
| 91 | guard.push(value); |
| 92 | drop(guard); |
| 93 | self.notifier.notify_one(); |
| 94 | Ok(()) |
| 95 | } |
| 96 | |
| 97 | /// Handle a clock disruption event |
| 98 | /// |
no test coverage detected