#[non_exhaustive]pub struct SendMessageConfiguration {
pub accepted_output_modes: Vec<String>,
pub task_push_notification_config: Option<TaskPushNotificationConfig>,
pub history_length: Option<u32>,
pub return_immediately: Option<bool>,
}Expand description
Configuration of a send message request.
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.accepted_output_modes: Vec<String>A list of media types the client is prepared to accept for response parts. Agents SHOULD use this to tailor their output.
ProtoJSON printers (all official SDKs) omit empty repeated fields, so
absent on the wire means empty — “no preference”. Requiring the key
rejected real official-SDK requests at parse time.
task_push_notification_config: Option<TaskPushNotificationConfig>Configuration for the agent to send push notifications for task updates.
Task id should be empty when sending this configuration in a SendMessage request.
history_length: Option<u32>The maximum number of most recent messages from the task’s history to retrieve in the response. An unset value means the client does not impose any limit. A value of zero is a request to not include any messages. The server MUST NOT return more messages than the provided value, but MAY apply a lower limit.
return_immediately: Option<bool>If true, the operation returns immediately after creating the task,
even if processing is still in progress.
If false (default), the operation MUST wait until the task reaches a
terminal (COMPLETED, FAILED, CANCELED, REJECTED) or interrupted
(INPUT_REQUIRED, AUTH_REQUIRED) state before returning.
Implementations§
Source§impl SendMessageConfiguration
impl SendMessageConfiguration
Sourcepub fn new() -> SendMessageConfiguration
pub fn new() -> SendMessageConfiguration
The default configuration: plain text accepted, no history limit, no push configuration, and the call waits for the task.
Sourcepub fn with_accepted_output_modes(
self,
modes: Vec<String>,
) -> SendMessageConfiguration
pub fn with_accepted_output_modes( self, modes: Vec<String>, ) -> SendMessageConfiguration
Sets the media types the client accepts in the agent’s reply.
Sourcepub fn with_task_push_notification_config(
self,
config: TaskPushNotificationConfig,
) -> SendMessageConfiguration
pub fn with_task_push_notification_config( self, config: TaskPushNotificationConfig, ) -> SendMessageConfiguration
Asks the server to push the task’s updates to config.
Sourcepub const fn with_history_length(self, n: u32) -> SendMessageConfiguration
pub const fn with_history_length(self, n: u32) -> SendMessageConfiguration
Asks for at most n of the most recent history messages.
Sourcepub const fn with_return_immediately(
self,
return_immediately: bool,
) -> SendMessageConfiguration
pub const fn with_return_immediately( self, return_immediately: bool, ) -> SendMessageConfiguration
Sets whether the call returns before the task completes.
Trait Implementations§
Source§impl AcceptedFields for SendMessageConfiguration
impl AcceptedFields for SendMessageConfiguration
Source§fn accepted_fields() -> &'static [&'static str]
fn accepted_fields() -> &'static [&'static str]
Source§impl Clone for SendMessageConfiguration
impl Clone for SendMessageConfiguration
Source§fn clone(&self) -> SendMessageConfiguration
fn clone(&self) -> SendMessageConfiguration
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 SendMessageConfiguration
impl Debug for SendMessageConfiguration
Source§impl Default for SendMessageConfiguration
impl Default for SendMessageConfiguration
Source§fn default() -> SendMessageConfiguration
fn default() -> SendMessageConfiguration
Source§impl<'de> Deserialize<'de> for SendMessageConfiguration
impl<'de> Deserialize<'de> for SendMessageConfiguration
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SendMessageConfiguration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SendMessageConfiguration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for SendMessageConfiguration
impl Serialize for SendMessageConfiguration
Source§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,
Source§impl TryFrom<SendMessageConfiguration> for SendMessageConfiguration
impl TryFrom<SendMessageConfiguration> for SendMessageConfiguration
Source§type Error = ConvertError
type Error = ConvertError
Source§fn try_from(
value: SendMessageConfiguration,
) -> Result<SendMessageConfiguration, <SendMessageConfiguration as TryFrom<SendMessageConfiguration>>::Error>
fn try_from( value: SendMessageConfiguration, ) -> Result<SendMessageConfiguration, <SendMessageConfiguration as TryFrom<SendMessageConfiguration>>::Error>
Source§impl TryFrom<SendMessageConfiguration> for SendMessageConfiguration
impl TryFrom<SendMessageConfiguration> for SendMessageConfiguration
Source§type Error = ConvertError
type Error = ConvertError
Source§fn try_from(
value: SendMessageConfiguration,
) -> Result<SendMessageConfiguration, <SendMessageConfiguration as TryFrom<SendMessageConfiguration>>::Error>
fn try_from( value: SendMessageConfiguration, ) -> Result<SendMessageConfiguration, <SendMessageConfiguration as TryFrom<SendMessageConfiguration>>::Error>
Auto Trait Implementations§
impl Forget for SendMessageConfiguration
impl Freeze for SendMessageConfiguration
impl Move for SendMessageConfiguration
impl RefUnwindSafe for SendMessageConfiguration
impl Send for SendMessageConfiguration
impl Sync for SendMessageConfiguration
impl Unpin for SendMessageConfiguration
impl UnsafeUnpin for SendMessageConfiguration
impl UnwindSafe for SendMessageConfiguration
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].