pub struct Delta;Expand description
Numeric accumulator: each write is added to the running total.
Integer writes stay integers; any float write promotes the total to a float. Allows concurrent same-step writes.
Trait Implementations§
Source§impl Channel for Delta
impl Channel for Delta
Source§fn kind(&self) -> &'static str
fn kind(&self) -> &'static str
A short, stable kind tag used for debugging and topology export.
Source§fn merge(&self, current: Option<&Value>, incoming: Value) -> Result<Value>
fn merge(&self, current: Option<&Value>, incoming: Value) -> Result<Value>
Folds
incoming into the channel’s current value, returning the new
value. current is None the first time the channel is written.Source§fn allows_concurrent(&self) -> bool
fn allows_concurrent(&self) -> bool
Whether more than one concurrent branch may write this channel within a
single superstep. Aggregates (append/fold/accumulate/barrier) return
true; overwrite-style channels return false and trigger
crate::TinyAgentsError::InvalidConcurrentUpdate on a same-step clash.Source§fn clone_box(&self) -> Box<dyn Channel>
fn clone_box(&self) -> Box<dyn Channel>
Clones the channel into a fresh box (enables
Clone for ChannelSet).Source§fn is_ephemeral(&self) -> bool
fn is_ephemeral(&self) -> bool
Whether the channel’s value is cleared at the start of the next step.
Source§fn is_tracked(&self) -> bool
fn is_tracked(&self) -> bool
impl Copy for Delta
Auto Trait Implementations§
impl Freeze for Delta
impl RefUnwindSafe for Delta
impl Send for Delta
impl Sync for Delta
impl Unpin for Delta
impl UnsafeUnpin for Delta
impl UnwindSafe for Delta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more