Skip to main content

SqlxError

Struct SqlxError 

Source
pub struct SqlxError(pub Arc<Error>);
Expand description

Elicitation-enabled wrapper around sqlx::Error.

This newtype uses Arc internally to ensure Clone is always available, providing transparent access via Deref and DerefMut.

Tuple Fields§

§0: Arc<Error>

Implementations§

Source§

impl SqlxError

Source

pub fn kind_label(&self) -> String

Returns a human-readable label for the error kind.

Source

pub fn message(&self) -> String

Returns the full error message string.

Source§

impl SqlxError

Source

pub fn kind_label_tool_tool_attr() -> Tool

Generated tool metadata function for kind_label_tool

Source

pub fn kind_label_tool(&self) -> Result<Json<String>, ErrorData>

kind_label MCP tool wrapper method.

Source

pub fn message_tool_tool_attr() -> Tool

Generated tool metadata function for message_tool

Source

pub fn message_tool(&self) -> Result<Json<String>, ErrorData>

message MCP tool wrapper method.

Methods from Deref<Target = Error>§

Source

pub fn as_database_error(&self) -> Option<&(dyn DatabaseError + 'static)>

Trait Implementations§

Source§

impl AsRef<Error> for SqlxError

Source§

fn as_ref(&self) -> &Error

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for SqlxError

Source§

fn clone(&self) -> SqlxError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SqlxError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for SqlxError

Source§

type Target = Error

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for SqlxError

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'de> Deserialize<'de> for SqlxError

Source§

fn deserialize<D: Deserializer<'de>>(_d: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ElicitComplete for SqlxError

Source§

fn validate_proofs_non_empty() -> bool

Runtime check: all three proof methods return non-empty TokenStreams. Read more
Source§

fn kani_proof_contains<Inner>() -> bool
where Inner: Elicitation,

Runtime check: does this type’s Kani proof contain Inner’s Kani proof? Read more
Source§

fn verus_proof_contains<Inner>() -> bool
where Inner: Elicitation,

Runtime check: does this type’s Verus proof contain Inner’s Verus proof?
Source§

fn creusot_proof_contains<Inner>() -> bool
where Inner: Elicitation,

Runtime check: does this type’s Creusot proof contain Inner’s Creusot proof?
Source§

impl ElicitIntrospect for SqlxError

Source§

fn pattern() -> ElicitationPattern

What elicitation pattern does this type use? Read more
Source§

fn metadata() -> TypeMetadata

Get the complete structural metadata for this type. Read more
Source§

impl ElicitSpec for SqlxError

Source§

fn type_spec() -> TypeSpec

Returns the complete spec for this type.
Source§

impl Elicitation for SqlxError

Source§

type Style = ()

The style enum for this type. Read more
Source§

async fn elicit<C: ElicitCommunicator>(_communicator: &C) -> ElicitResult<Self>

Elicit a value of this type from the user via style-aware client. Read more
Source§

fn kani_proof() -> TokenStream

Generate a Kani symbolic execution proof harness for this type. Read more
Source§

fn verus_proof() -> TokenStream

Returns a proc_macro2::TokenStream containing a Verus-verified function with requires/ensures specifications for this type’s invariants. Read more
Source§

fn creusot_proof() -> TokenStream

Returns a proc_macro2::TokenStream containing Creusot contract functions with #[requires]/#[ensures]/#[trusted] attributes for this type’s invariants. Read more
Source§

fn elicit_checked( peer: Peer<RoleServer>, ) -> impl Future<Output = Result<Self, ElicitError>> + Send

Server-side elicitation via MCP peer. Read more
Source§

fn with_style(style: Self::Style) -> ElicitBuilder<Self>

Create a builder for one-off style override. Read more
Source§

fn elicit_proven<C>( communicator: &C, ) -> impl Future<Output = Result<(Self, Established<Is<Self>>), ElicitError>> + Send

Elicit a value with proof it inhabits type Self. Read more
Source§

fn prusti_proof() -> TokenStream

Returns a proc_macro2::TokenStream containing Prusti contract functions with #[requires]/#[ensures] attributes for this type’s invariants. Read more
Source§

impl From<Arc<Error>> for SqlxError

Source§

fn from(arc: Arc<Error>) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for SqlxError

Source§

fn from(inner: Error) -> Self

Converts to this type from the input type.
Source§

impl From<SqlxError> for Arc<Error>

Source§

fn from(wrapper: SqlxError) -> Self

Converts to this type from the input type.
Source§

impl JsonSchema for SqlxError

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn json_schema(_gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

impl Prompt for SqlxError

Source§

fn prompt() -> Option<&'static str>

Optional prompt to guide user interaction. Read more
Source§

impl Serialize for SqlxError

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl ToCodeLiteral for SqlxError

Source§

fn to_code_literal(&self) -> TokenStream

Return a TokenStream containing a single Rust expression whose evaluation produces a value equal to self.
Source§

fn type_tokens() -> TokenStream
where Self: Sized,

Token stream for the concrete type name (used to annotate None::<T>). Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> ElicitJson for T
where T: JsonSchema + DeserializeOwned + Send + 'static,

Source§

async fn elicit_json<C>(communicator: &C) -> Result<T, ElicitError>

Elicit a value by presenting the JSON schema and parsing the response.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToSqlxArgs for T

Source§

fn to_sqlx_args(&self) -> Vec<Value>

Serialize self into ordered positional SQL argument values.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithContract for T
where T: Elicitation + Clone + Debug + Send,

Source§

fn with_contract<C>(contract: C) -> ContractedElicitation<Self, C>
where C: Contract<Input = Self, Output = Self> + Send + Sync + 'static,

Attach a contract to this type’s elicitation. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Refines<T> for T
where T: 'static,