#[non_exhaustive]pub enum SessionMessage {
Message(Dispatch),
PromptResponse(Result<PromptResponse, Error>),
}Expand description
An item on a stable protocol v1 session’s update stream, returned by
ActiveSession::read_update.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Message(Dispatch)
A request or notification the agent sent for this session, such as a
session/update notification or a session/request_permission
request.
Request handles are typed for protocol v1. To match on the message
type with MatchDispatch, convert it with
Dispatch::into_raw first.
PromptResponse(Result<PromptResponse, Error>)
The response to a session/prompt request sent with
ActiveSession::send_prompt or
ActiveSession::send_prompt_blocks, which ends that prompt turn.
An error response from the agent arrives here as Err. It does not
close the connection or affect other sessions.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SessionMessage
impl !Sync for SessionMessage
impl !UnwindSafe for SessionMessage
impl Freeze for SessionMessage
impl Send for SessionMessage
impl Unpin for SessionMessage
impl UnsafeUnpin for SessionMessage
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.