MCPcopy Create free account
hub / github.com/aws/clock-bound / send

Method send

clock-bound/src/daemon/async_ring_buffer.rs:83–95  ·  view source on GitHub ↗
(&self, value: T)

Source from the content-addressed store, hash-verified

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 ///

Callers 15

handle_eventMethod · 0.80
basic_send_receiveFunction · 0.80
buffer_overflowFunction · 0.80
sender_dropFunction · 0.80
empty_bufferFunction · 0.80
concurrent_send_receiveFunction · 0.80
cancel_safetyFunction · 0.80
shutdown_allMethod · 0.80
receiver_streamFunction · 0.80

Calls 2

DisruptedClass · 0.85
pushMethod · 0.45

Tested by

no test coverage detected