#[non_exhaustive]pub struct SessionNotification {
pub session_id: SessionId,
pub update: SessionUpdate,
pub meta: Option<Meta>,
}Expand description
Notification containing a session update from the agent.
Used to stream real-time progress and results during prompt processing.
See protocol docs: Agent Reports Output
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: SessionIdThe ID of the session this update pertains to.
update: SessionUpdateThe actual update content.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl SessionNotification
impl SessionNotification
Sourcepub fn new(session_id: impl Into<SessionId>, update: SessionUpdate) -> Self
pub fn new(session_id: impl Into<SessionId>, update: SessionUpdate) -> Self
Builds SessionNotification with the required notification fields set; optional fields start unset or empty.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for SessionNotification
impl Clone for SessionNotification
Source§fn clone(&self) -> SessionNotification
fn clone(&self) -> SessionNotification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionNotification
impl Debug for SessionNotification
Source§impl<'de> Deserialize<'de> for SessionNotification
impl<'de> Deserialize<'de> for SessionNotification
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>,
Source§impl IntoV2 for SessionNotification
Available on crate feature unstable_protocol_v2 only.
impl IntoV2 for SessionNotification
unstable_protocol_v2 only.Source§impl JsonSchema for SessionNotification
impl JsonSchema for SessionNotification
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SessionNotification
impl PartialEq for SessionNotification
Source§fn eq(&self, other: &SessionNotification) -> bool
fn eq(&self, other: &SessionNotification) -> bool
self and other values to be equal, and is used by ==.