pub struct Notification {
pub method: String,
pub params: Value,
}Expand description
A message the server sent without being asked.
params is null when the server sent none.
Fields§
§method: StringThe method name, for example turn/completed.
params: ValueThe method’s parameters.
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn agent_message(&self) -> Option<AgentMessage>
pub fn agent_message(&self) -> Option<AgentMessage>
Decode an item/completed notification for an agent message, or None
for anything else.
A turn may produce several: progress remarks (commentary) and then
the answer (final_answer). Unlike turn/completed, this notification
carries the text on every CLI version tested.
Sourcepub fn turn_completed(&self) -> Option<TurnCompleted>
pub fn turn_completed(&self) -> Option<TurnCompleted>
Decode a turn/completed notification, or None for any other method
or a payload that does not have the verified shape.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§impl Debug for Notification
impl Debug for Notification
Source§impl PartialEq for Notification
impl PartialEq for Notification
impl StructuralPartialEq for Notification
Auto Trait Implementations§
impl Forget for Notification
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
impl UnwindSafe for Notification
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