pub enum SqlResult<T> {
    Success(T),
    SuccessWithInfo(T),
    Error {
        function: &'static str,
    },
}
Expand description

Result of an ODBC function call. Variants hold the same meaning as the constants associated with SqlReturn. This type may hold results, but it is still the responsibility of the user to fetch and handle the diagnostics in case of an Error.

Variants

Success(T)

The function has been executed successfully.

SuccessWithInfo(T)

The function has been executed successfully. There have been warnings.

Error

Fields

function: &'static str

Name of the ODBC Api call which caused the error. This might help interpreting associatedif the error ODBC diagnostics if the error is bubbeld all the way up to the end users output, but the context is lost.

Function returned error state. Check diagnostics.

Implementations

Append a return value a successful to Result

True if variant is SqlResult::Error.

Applies f to any value wrapped in Success or SuccessWithInfo.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.