pub struct QueryFragmentEmitted;Expand description
Proposition: a sqlx::query!(sql, params…) source fragment was emitted.
Established by [emit_query] after EmitCode::emit_code succeeds.
The fragment contains a valid macro invocation; it does NOT guarantee
that the emitted binary will compile (requires DATABASE_URL at
consumer build time).
Implementations§
Source§impl QueryFragmentEmitted
impl QueryFragmentEmitted
Sourcepub fn elicit_checked_tool_attr() -> Tool
pub fn elicit_checked_tool_attr() -> Tool
Generated tool metadata function for elicit_checked
Sourcepub fn elicit_checked(
peer: Peer<RoleServer>,
) -> Pin<Box<dyn Future<Output = Result<Self, ElicitError>> + Send + 'static>>
pub fn elicit_checked( peer: Peer<RoleServer>, ) -> Pin<Box<dyn Future<Output = Result<Self, ElicitError>> + Send + 'static>>
Checked elicitation via MCP protocol.
This is the verified, registered variant suitable for production use. Uses server-side elicitation to interactively elicit a value from the requesting client via MCP.
Automatically registered as an MCP tool via #[rmcp::tool].
§Examples
// In a tool handler with peer: Peer<RoleServer>
let config = Config::elicit_checked(peer).await?;§Implementation
Creates an ElicitServer wrapper and delegates to the Elicitation trait.
This provides server-side elicitation with the same style system and
validation logic as client-side elicitation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QueryFragmentEmitted
impl<'de> Deserialize<'de> for QueryFragmentEmitted
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 ElicitComplete for QueryFragmentEmitted
impl ElicitComplete for QueryFragmentEmitted
Source§fn validate_proofs_non_empty() -> bool
fn validate_proofs_non_empty() -> bool
Source§fn kani_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
fn kani_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
Inner’s Kani proof? Read moreSource§fn verus_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
fn verus_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
Inner’s Verus proof?Source§fn creusot_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
fn creusot_proof_contains<Inner>() -> boolwhere
Inner: Elicitation,
Inner’s Creusot proof?Source§impl ElicitIntrospect for QueryFragmentEmitted
impl ElicitIntrospect for QueryFragmentEmitted
Source§fn pattern() -> ElicitationPattern
fn pattern() -> ElicitationPattern
Source§fn metadata() -> TypeMetadata
fn metadata() -> TypeMetadata
Source§impl ElicitSpec for QueryFragmentEmitted
impl ElicitSpec for QueryFragmentEmitted
Source§impl Elicitation for QueryFragmentEmitted
impl Elicitation for QueryFragmentEmitted
Source§async fn elicit<C: ElicitCommunicator>(_communicator: &C) -> ElicitResult<Self>
async fn elicit<C: ElicitCommunicator>(_communicator: &C) -> ElicitResult<Self>
Source§fn kani_proof() -> TokenStream
fn kani_proof() -> TokenStream
Source§fn verus_proof() -> TokenStream
fn verus_proof() -> TokenStream
proc_macro2::TokenStream containing a Verus-verified function
with requires/ensures specifications for this type’s invariants. Read moreSource§fn creusot_proof() -> TokenStream
fn creusot_proof() -> TokenStream
proc_macro2::TokenStream containing Creusot contract functions
with #[requires]/#[ensures]/#[trusted] attributes for this type’s invariants. Read moreSource§fn elicit_checked(
peer: Peer<RoleServer>,
) -> impl Future<Output = Result<Self, ElicitError>> + Send
fn elicit_checked( peer: Peer<RoleServer>, ) -> impl Future<Output = Result<Self, ElicitError>> + Send
Source§fn with_style(style: Self::Style) -> ElicitBuilder<Self>
fn with_style(style: Self::Style) -> ElicitBuilder<Self>
Source§fn elicit_proven<C>(
communicator: &C,
) -> impl Future<Output = Result<(Self, Established<Is<Self>>), ElicitError>> + Sendwhere
C: ElicitCommunicator,
fn elicit_proven<C>(
communicator: &C,
) -> impl Future<Output = Result<(Self, Established<Is<Self>>), ElicitError>> + Sendwhere
C: ElicitCommunicator,
Source§fn prusti_proof() -> TokenStream
fn prusti_proof() -> TokenStream
proc_macro2::TokenStream containing Prusti contract functions
with #[requires]/#[ensures] attributes for this type’s invariants. Read moreSource§impl JsonSchema for QueryFragmentEmitted
impl JsonSchema for QueryFragmentEmitted
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 Prompt for QueryFragmentEmitted
impl Prompt for QueryFragmentEmitted
Source§impl Prop for QueryFragmentEmitted
impl Prop for QueryFragmentEmitted
Source§fn kani_proof() -> TokenStream
fn kani_proof() -> TokenStream
Source§fn verus_proof() -> TokenStream
fn verus_proof() -> TokenStream
Source§fn creusot_proof() -> TokenStream
fn creusot_proof() -> TokenStream
Source§impl Serialize for QueryFragmentEmitted
impl Serialize for QueryFragmentEmitted
Source§impl Survey for QueryFragmentEmitted
impl Survey for QueryFragmentEmitted
Source§impl ToCodeLiteral for QueryFragmentEmitted
impl ToCodeLiteral for QueryFragmentEmitted
Source§fn to_code_literal(&self) -> TokenStream
fn to_code_literal(&self) -> TokenStream
TokenStream containing a single Rust expression whose
evaluation produces a value equal to self.Source§fn type_tokens() -> TokenStream
fn type_tokens() -> TokenStream
None::<T>). Read moreSource§impl VerifiedWorkflow for QueryFragmentEmitted
impl VerifiedWorkflow for QueryFragmentEmitted
Source§fn validate_proofs_non_empty() -> bool
fn validate_proofs_non_empty() -> bool
Source§fn kani_proof_contains<Inner>() -> boolwhere
Inner: Prop,
fn kani_proof_contains<Inner>() -> boolwhere
Inner: Prop,
Inner’s? Read moreSource§fn verus_proof_contains<Inner>() -> boolwhere
Inner: Prop,
fn verus_proof_contains<Inner>() -> boolwhere
Inner: Prop,
Inner’s?Source§fn creusot_proof_contains<Inner>() -> boolwhere
Inner: Prop,
fn creusot_proof_contains<Inner>() -> boolwhere
Inner: Prop,
Inner’s?Auto Trait Implementations§
impl Freeze for QueryFragmentEmitted
impl RefUnwindSafe for QueryFragmentEmitted
impl Send for QueryFragmentEmitted
impl Sync for QueryFragmentEmitted
impl Unpin for QueryFragmentEmitted
impl UnsafeUnpin for QueryFragmentEmitted
impl UnwindSafe for QueryFragmentEmitted
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
Source§impl<T> ElicitJson for T
impl<T> ElicitJson for T
Source§async fn elicit_json<C>(communicator: &C) -> Result<T, ElicitError>where
C: ElicitCommunicator,
async fn elicit_json<C>(communicator: &C) -> Result<T, ElicitError>where
C: ElicitCommunicator,
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> 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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToSqlxArgs for Twhere
T: Elicitation + Serialize,
impl<T> ToSqlxArgs for Twhere
T: Elicitation + Serialize,
Source§fn to_sqlx_args(&self) -> Vec<Value>
fn to_sqlx_args(&self) -> Vec<Value>
self into ordered positional SQL argument values.