Add some methods to Row

This commit is contained in:
Steven Fackler 2016-12-23 10:54:53 -05:00
parent a8717d26aa
commit e62854a4c2

View File

@ -682,6 +682,14 @@ pub struct Row {
}
impl Row {
pub fn columns(&self) -> &[Column] {
&self.columns
}
pub fn len(&self) -> usize {
self.columns.len()
}
pub fn get<T, I>(&self, idx: I) -> T
where T: FromSql,
I: RowIndex + fmt::Debug