get_or_error

Function get_or_error 

Source
pub fn get_or_error<'a, I: RowIndex + Display, T: FromSql<'a>>(
    row: &'a Row,
    index: I,
) -> Result<T, C3p0Error>
Expand description

Attempts to retrieve a value of type T from the given row at the specified index.

  • row: The database row from which to retrieve the value.
  • index: The index in the row at which the value is expected to be found.

Returns the value of type T if successful, or a C3p0Error::RowMapperError if the value cannot be retrieved, including details about the index and the encountered error.