pub struct Row {
pub values: Vec<Value>,
}Expand description
One fetched row, cells aligned with the query’s columns.
Fields§
§values: Vec<Value>Cell values, one per selected column.
Implementations§
Source§impl Row
impl Row
Sourcepub fn int(&self, i: usize) -> Result<i64, StoreError>
pub fn int(&self, i: usize) -> Result<i64, StoreError>
Cell i as i64, or StoreError::Value.
Sourcepub fn float(&self, i: usize) -> Result<f64, StoreError>
pub fn float(&self, i: usize) -> Result<f64, StoreError>
Cell i as f64, or StoreError::Value.
Sourcepub fn str(&self, i: usize) -> Result<String, StoreError>
pub fn str(&self, i: usize) -> Result<String, StoreError>
Cell i as String, or StoreError::Value.
Sourcepub fn opt_str(&self, i: usize) -> Option<String>
pub fn opt_str(&self, i: usize) -> Option<String>
Cell i as Option<String>, None when null or not text.
Sourcepub fn bool(&self, i: usize) -> Result<bool, StoreError>
pub fn bool(&self, i: usize) -> Result<bool, StoreError>
Cell i as bool (integers count as truthy), or StoreError::Value.
Sourcepub fn datetime(&self, i: usize) -> Result<DateTime<Utc>, StoreError>
pub fn datetime(&self, i: usize) -> Result<DateTime<Utc>, StoreError>
Cell i as DateTime<Utc> (accepts int timestamps and RFC 3339 text), or StoreError::Value.
Sourcepub fn decimal(&self, i: usize) -> Result<Decimal, StoreError>
pub fn decimal(&self, i: usize) -> Result<Decimal, StoreError>
Cell i as Decimal (accepts text), or StoreError::Value.
Trait Implementations§
Source§impl Serialize for Row
impl Serialize for Row
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Row
Auto Trait Implementations§
impl Forget for Row
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more