Enum odbc_safe::Return [] [src]

#[must_use]
pub enum Return<T, E = ()> { Success(T), Info(T), Error(E), }

Holds result and indicates the overall success or failure of a function.

Variants

The function has been executed successfully. Holds result.

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

An error occured.

Methods

impl<T, E> Return<T, E>
[src]

[src]

Maps a Return<T,E> to Return<U,E> by applying a function to a contained Success or Info value, leaving an Error value untouched.

[src]

Maps a Return<T,E> to Result<T,U> by applying a function to a contained Error value, leaving aSuccessor anInfo` value untouched.

[src]

Unwraps the result, yielding the content of Success or Info

[src]

Transforms the Return<T,E> into a Result<T,U>, mapping Success(v) | Info(v) to Ok(v) and Error(err) to Err(err.into()).

Trait Implementations

impl<T: Debug, E: Debug> Debug for Return<T, E>
[src]

[src]

Formats the value using the given formatter. Read more

impl From<SQLRETURN> for Return<()>
[src]

[src]

Performs the conversion.

impl<S, E> Diagnostics for Return<S, E> where
    S: Diagnostics,
    E: Diagnostics
[src]

[src]

Returns the current values of multiple fields of a diagnostic record that contains error, warning, and status information. Read more

Auto Trait Implementations

impl<T, E> Send for Return<T, E> where
    E: Send,
    T: Send

impl<T, E> Sync for Return<T, E> where
    E: Sync,
    T: Sync