pub struct LastValue;Expand description
Overwrite channel: each write replaces the value (last-value semantics).
Rejects concurrent same-step writes from multiple branches with
crate::TinyAgentsError::InvalidConcurrentUpdate.
Trait Implementations§
Source§impl Channel for LastValue
impl Channel for LastValue
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 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 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 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 LastValue
Auto Trait Implementations§
impl Freeze for LastValue
impl RefUnwindSafe for LastValue
impl Send for LastValue
impl Sync for LastValue
impl Unpin for LastValue
impl UnsafeUnpin for LastValue
impl UnwindSafe for LastValue
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