pub struct Row { /* private fields */ }Expand description
A row of data returned from the database by a query.
Implementations§
Source§impl Row
impl Row
Sourcepub fn get<'a, I, T>(&'a self, idx: I) -> T
pub fn get<'a, I, T>(&'a self, idx: I) -> T
Deserializes a value from the row.
The value can be specified either by its numeric index in the row, or by its column name.
§Panics
Panics if the index is out of bounds or if the value cannot be converted to the specified type.
Sourcepub fn try_get<'a, I, T>(&'a self, idx: I) -> Result<T, Error>
pub fn try_get<'a, I, T>(&'a self, idx: I) -> Result<T, Error>
Like Row::get, but returns a Result rather than panicking.
Sourcepub fn raw_size_bytes(&self) -> usize
pub fn raw_size_bytes(&self) -> usize
Returns the raw size of the row in bytes.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Row
impl !RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin 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