pub enum ListenToolUpdate {
Listening {
operation_id: String,
revision: u64,
message: String,
snapshot: Option<Value>,
expires_at: Option<OffsetDateTime>,
},
Ready {
operation_id: String,
revision: u64,
message: String,
snapshot: Value,
expires_at: Option<OffsetDateTime>,
},
Invalidated {
operation_id: String,
message: String,
recoverable: bool,
},
}Expand description
Update emitted from a listen() stream.
This models workflows where a runtime prepares an operation over time, and execution happens later using an operation identifier and revision.
Variants§
Listening
Preparation is still running and should keep listening.
Fields
§
expires_at: Option<OffsetDateTime>Optional expiration timestamp (RFC3339).
Ready
Preparation is complete and execution can be confirmed.
Fields
§
expires_at: Option<OffsetDateTime>Optional expiration timestamp (RFC3339).
Invalidated
Operation is no longer valid.
Trait Implementations§
Source§impl Clone for ListenToolUpdate
impl Clone for ListenToolUpdate
Source§fn clone(&self) -> ListenToolUpdate
fn clone(&self) -> ListenToolUpdate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ListenToolUpdate
impl Debug for ListenToolUpdate
Source§impl<'de> Deserialize<'de> for ListenToolUpdate
impl<'de> Deserialize<'de> for ListenToolUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ListenToolUpdate
impl RefUnwindSafe for ListenToolUpdate
impl Send for ListenToolUpdate
impl Sync for ListenToolUpdate
impl Unpin for ListenToolUpdate
impl UnsafeUnpin for ListenToolUpdate
impl UnwindSafe for ListenToolUpdate
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