@@ -8,7 +8,7 @@ use std::{fmt::Debug, marker::PhantomData};
88/// Synchronous producer for records of type `T`.
99///
1010/// Thread-safe, can be cloned and shared across threads.
11- /// Values are moved (not cloned) through channels for zero-copy performance .
11+ /// Values are moved (not cloned) directly into the record's buffer .
1212///
1313/// # Thread Safety
1414///
@@ -29,7 +29,7 @@ use std::{fmt::Debug, marker::PhantomData};
2929/// // Try to set (non-blocking)
3030/// match producer.try_set(Temperature { celsius: 27.0 }) {
3131/// Ok(()) => println!("Success"),
32- /// Err(_) => println!("Channel full, try later"),
32+ /// Err(_) => println!("Buffer full, try later"),
3333/// }
3434/// # Ok(())
3535/// # }
@@ -99,16 +99,13 @@ where
9999
100100 /// Try to set the value without blocking.
101101 ///
102- /// Attempts to send the value immediately. Returns an error if the channel is full
103- /// or the runtime thread has shut down.
104- ///
105- /// **Note**: This method returns immediately after sending to the channel, but does NOT
106- /// wait for the produce operation to complete. Use `set()` if
107- /// you need to know whether the produce operation succeeded.
102+ /// Pushes the value directly into the record's buffer. Unlike `set()`, this never
103+ /// blocks: it fails immediately if the buffer is full instead of waiting for space.
108104 ///
109105 /// # Errors
110106 ///
111- /// Returns `SyncError::SetTimeout` if the channel is full.
107+ /// Returns `SyncError::SetTimeout` for bounded, non-overwriting buffer
108+ /// implementations if the buffer is full.
112109 /// Returns `SyncError::RuntimeShutdown` if the runtime thread has been detached.
113110 ///
114111 /// # Example
@@ -129,7 +126,7 @@ where
129126 /// let producer = handle.producer::<MyData>("my_data")?;
130127 /// match producer.try_set(MyData { value: 42 }) {
131128 /// Ok(()) => println!("Sent immediately"),
132- /// Err(_) => println!("Channel full or runtime shutdown"),
129+ /// Err(_) => println!("Buffer full or runtime shutdown"),
133130 /// }
134131 /// # Ok(())
135132 /// # }
0 commit comments