pub struct BinaryOperatorAggregate { /* private fields */ }Expand description
Applies a binary operator to accumulate values.
Created when a state key uses a reducer (e.g., Annotated[list, add_messages]). Supports Overwrite to bypass the reducer.
Implementations§
Trait Implementations§
Source§impl Channel for BinaryOperatorAggregate
impl Channel for BinaryOperatorAggregate
Source§fn checkpoint(&self) -> Option<JsonValue>
fn checkpoint(&self) -> Option<JsonValue>
Return a serializable checkpoint of this channel’s state.
Returns None if the channel is empty (MISSING).
Source§fn from_checkpoint(&self, checkpoint: Option<&JsonValue>) -> Box<dyn Channel>
fn from_checkpoint(&self, checkpoint: Option<&JsonValue>) -> Box<dyn Channel>
Restore channel state from a checkpoint.
Source§fn update(&self, values: &[JsonValue]) -> Result<bool, ChannelError>
fn update(&self, values: &[JsonValue]) -> Result<bool, ChannelError>
Apply a batch of updates. Returns true if the channel was modified.
Source§fn get(&self) -> Result<JsonValue, ChannelError>
fn get(&self) -> Result<JsonValue, ChannelError>
Get the current value. Returns Err(EmptyChannel) if empty.
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Return true if the channel has a value available.
Source§fn clone_channel(&self) -> Box<dyn Channel>
fn clone_channel(&self) -> Box<dyn Channel>
Clone this channel (for checkpoint restoration).
Auto Trait Implementations§
impl !Freeze for BinaryOperatorAggregate
impl !RefUnwindSafe for BinaryOperatorAggregate
impl Send for BinaryOperatorAggregate
impl Sync for BinaryOperatorAggregate
impl Unpin for BinaryOperatorAggregate
impl UnsafeUnpin for BinaryOperatorAggregate
impl UnwindSafe for BinaryOperatorAggregate
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