#[non_exhaustive]pub struct CreateElicitationRequest {
pub mode: ElicitationMode,
pub message: String,
pub meta: Option<Meta>,
}unstable_elicitation only.Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Request from the agent to elicit structured user input.
The agent sends this to the client to request information from the user, either via a form or by directing them to a URL. Elicitations are tied to a session (optionally a tool call) or a 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.mode: ElicitationModeThe elicitation mode and its mode-specific fields.
message: StringA human-readable message describing what input is needed.
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 CreateElicitationRequest
impl CreateElicitationRequest
pub fn new(mode: impl Into<ElicitationMode>, message: impl Into<String>) -> Self
Sourcepub fn scope(&self) -> &ElicitationScope
pub fn scope(&self) -> &ElicitationScope
Returns the scope this elicitation is tied to.
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 CreateElicitationRequest
impl Clone for CreateElicitationRequest
Source§fn clone(&self) -> CreateElicitationRequest
fn clone(&self) -> CreateElicitationRequest
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 CreateElicitationRequest
impl Debug for CreateElicitationRequest
Source§impl<'de> Deserialize<'de> for CreateElicitationRequest
impl<'de> Deserialize<'de> for CreateElicitationRequest
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 CreateElicitationRequest
Available on crate feature unstable_protocol_v2 only.
impl IntoV2 for CreateElicitationRequest
unstable_protocol_v2 only.Source§impl JsonSchema for CreateElicitationRequest
impl JsonSchema for CreateElicitationRequest
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 CreateElicitationRequest
impl PartialEq for CreateElicitationRequest
Source§fn eq(&self, other: &CreateElicitationRequest) -> bool
fn eq(&self, other: &CreateElicitationRequest) -> bool
self and other values to be equal, and is used by ==.