[][src]Trait c3p0_pool_sqlite::rusqlite::OptionalExtension

pub trait OptionalExtension<T> {
    fn optional(self) -> Result<Option<T>, Error>;
}

Required methods

fn optional(self) -> Result<Option<T>, Error>

Converts a Result<T> into a Result<Option<T>>.

By default, Rusqlite treats 0 rows being returned from a query that is expected to return 1 row as an error. This method will handle that error, and give you back an Option<T> instead.

Loading content...

Implementations on Foreign Types

impl<T> OptionalExtension<T> for Result<T, Error>[src]

Loading content...

Implementors

Loading content...