Struct SessionNotification
#[non_exhaustive]pub struct SessionNotification {
pub session_id: SessionId,
pub update: SessionUpdate,
pub meta: Option<Map<String, Value>>,
}Expand description
Re-exported so callers (Task 6) can match on session/update payloads without depending
on agent-client-protocol directly.
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<Map<String, Value>>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§
§impl SessionNotification
impl SessionNotification
pub fn new(
session_id: impl Into<SessionId>,
update: SessionUpdate,
) -> SessionNotification
pub fn new( session_id: impl Into<SessionId>, update: SessionUpdate, ) -> SessionNotification
Builds SessionNotification with the required notification fields set; optional fields start unset or empty.
pub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> SessionNotification
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> SessionNotification
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§
§impl Clone for SessionNotification
impl Clone for SessionNotification
§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 more§impl Debug for SessionNotification
impl Debug for SessionNotification
§impl<'de> Deserialize<'de> for SessionNotification
impl<'de> Deserialize<'de> for SessionNotification
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl JsonRpcMessage for SessionNotification
impl JsonRpcMessage for SessionNotification
§fn matches_method(method: &str) -> bool
fn matches_method(method: &str) -> bool
§fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
§fn parse_message(
method: &str,
params: &impl Serialize,
) -> Result<SessionNotification, Error>
fn parse_message( method: &str, params: &impl Serialize, ) -> Result<SessionNotification, Error>
impl JsonRpcNotification for SessionNotification
§impl JsonSchema for SessionNotification
impl JsonSchema for SessionNotification
§fn schema_name() -> Cow<'static, str>
fn schema_name() -> Cow<'static, str>
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more§impl PartialEq for SessionNotification
impl PartialEq for SessionNotification
§impl Serialize for SessionNotification
impl Serialize for SessionNotification
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SessionNotification
Auto Trait Implementations§
impl Freeze for SessionNotification
impl RefUnwindSafe for SessionNotification
impl Send for SessionNotification
impl Sync for SessionNotification
impl Unpin for SessionNotification
impl UnsafeUnpin for SessionNotification
impl UnwindSafe for SessionNotification
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more