pub struct Row { /* private fields */ }Expand description
One decoded result row: column names paired with backend-neutral values.
Dynamic projections and annotations decode into Row; models decode from
it with Model::from_row.
Implementations§
Source§impl Row
impl Row
Source§impl Row
impl Row
Sourcepub fn get_as<T: DbType>(&self, column: &str) -> Result<T, QueryError>
pub fn get_as<T: DbType>(&self, column: &str) -> Result<T, QueryError>
Value of column, decoded as T.
§Errors
QueryError::Decode if the column is missing or has the wrong type.
Sourcepub fn decode_at<T: DbType>(&self, index: usize) -> Result<T, QueryError>
pub fn decode_at<T: DbType>(&self, index: usize) -> Result<T, QueryError>
The index-th column, decoded as T.
§Errors
QueryError::Decode if there is no such column or it has the wrong type.
Trait Implementations§
impl StructuralPartialEq for Row
Auto Trait Implementations§
impl Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnsafeUnpin for Row
impl UnwindSafe for Row
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more