Enum odbc_safe::ReturnOption
[−]
[src]
#[must_use]pub enum ReturnOption<T, E = ()> { Success(T), Info(T), NoData(E), Error(E), }
Holds result and indicates the overall success or failure of a function.
Variants
Success(T)
The function has been executed successfully. Holds result.
Info(T)
The function has been executed successfully. There have been warnings. Holds result.
NoData(E)
No more data was available
Error(E)
An error occured.
Methods
impl<T, E> ReturnOption<T, E>
[src]
pub fn map<F, U>(self, f: F) -> ReturnOption<U, E> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
Maps a ReturnOption<T,E>
to ReturnOption<U,E>
by applying a function to a contained
Success
or Info
value, leaving an Error
or NoData
value untouched.
Trait Implementations
impl<T: Debug, E: Debug> Debug for ReturnOption<T, E>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl From<SQLRETURN> for ReturnOption<()>
[src]
fn from(source: SQLRETURN) -> ReturnOption<()>
[src]
Performs the conversion.
Auto Trait Implementations
impl<T, E> Send for ReturnOption<T, E> where
E: Send,
T: Send,
E: Send,
T: Send,
impl<T, E> Sync for ReturnOption<T, E> where
E: Sync,
T: Sync,
E: Sync,
T: Sync,