pub struct QueryResult {
pub rows: Vec<Row>,
}Expand description
Result of executing a read plan.
Fields§
§rows: Vec<Row>Rows in backend order.
Implementations§
Source§impl QueryResult
impl QueryResult
Sourcepub fn decode<M: Model>(&self) -> Result<Vec<M>, QueryError>
pub fn decode<M: Model>(&self) -> Result<Vec<M>, QueryError>
Decode every row as model M (columns looked up by name).
§Errors
QueryError::Decode for the first row that does not fit.
Sourcepub fn decode_values<T: FromValues>(&self) -> Result<Vec<T>, QueryError>
pub fn decode_values<T: FromValues>(&self) -> Result<Vec<T>, QueryError>
Decode every row by column position as T (a scalar or a tuple).
§Errors
QueryError::Decode for the first row that does not fit.
Trait Implementations§
Source§impl Clone for QueryResult
impl Clone for QueryResult
Source§fn clone(&self) -> QueryResult
fn clone(&self) -> QueryResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryResult
impl Debug for QueryResult
Source§impl Default for QueryResult
impl Default for QueryResult
Source§fn default() -> QueryResult
fn default() -> QueryResult
Returns the “default value” for a type. Read more
Source§impl PartialEq for QueryResult
impl PartialEq for QueryResult
impl StructuralPartialEq for QueryResult
Auto Trait Implementations§
impl Freeze for QueryResult
impl RefUnwindSafe for QueryResult
impl Send for QueryResult
impl Sync for QueryResult
impl Unpin for QueryResult
impl UnsafeUnpin for QueryResult
impl UnwindSafe for QueryResult
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