Struct tokio_postgres::rows::Row
[−]
[src]
pub struct Row { /* fields omitted */ }
A row from Postgres.
Methods
impl Row
[src]
fn columns(&self) -> &[Column]
Returns information about the columns in the row.
fn len(&self) -> usize
Returns the number of values in the row
fn get<T, I>(&self, idx: I) -> T where
T: FromSql,
I: RowIndex + Debug,
T: FromSql,
I: RowIndex + Debug,
Retrieves the contents of a field of the row.
A field can be accessed by the name or index of its column, though access by index is more efficient. Rows are 0-indexed.
Panics
Panics if the index does not reference a column or the return type is not compatible with the Postgres type.
fn try_get<T, I>(&self, idx: I) -> Result<Option<T>, Box<Error + Sync + Send>> where
T: FromSql,
I: RowIndex,
T: FromSql,
I: RowIndex,
Retrieves the contents of a field of the row.
A field can be accessed by the name or index of its column, though access by index is more efficient. Rows are 0-indexed.
Returns None
if the index does not reference a column, Some(Err(..))
if there was an error converting the result value, and Some(Ok(..))
on success.