pub struct RowView<'a> { /* private fields */ }Expand description
Borrowed view over a single row of a Data table.
Implementations§
Source§impl<'a> RowView<'a>
impl<'a> RowView<'a>
Sourcepub fn value(&self, column: usize) -> Option<Value<'a>>
pub fn value(&self, column: usize) -> Option<Value<'a>>
Returns a typed cell by positional column index.
Sourcepub fn named_value(&self, name: &str) -> Option<Value<'a>>
pub fn named_value(&self, name: &str) -> Option<Value<'a>>
Returns a typed cell by column name.
Sourcepub fn int(&self, column: usize) -> Option<i32>
pub fn int(&self, column: usize) -> Option<i32>
Returns a positional column as i32 if present and typed accordingly.
Sourcepub fn uint(&self, column: usize) -> Option<u32>
pub fn uint(&self, column: usize) -> Option<u32>
Returns a positional column as u32 if present and typed accordingly.
Sourcepub fn long(&self, column: usize) -> Option<i64>
pub fn long(&self, column: usize) -> Option<i64>
Returns a positional column as i64 if present and typed accordingly.
Sourcepub fn ulong(&self, column: usize) -> Option<u64>
pub fn ulong(&self, column: usize) -> Option<u64>
Returns a positional column as u64 if present and typed accordingly.
Sourcepub fn double(&self, column: usize) -> Option<f64>
pub fn double(&self, column: usize) -> Option<f64>
Returns a positional column as f64 if present and typed accordingly.
Sourcepub fn string(&self, column: usize) -> Option<&'a str>
pub fn string(&self, column: usize) -> Option<&'a str>
Returns a positional column as &str if present and typed accordingly.
Sourcepub fn bool(&self, column: usize) -> Option<bool>
pub fn bool(&self, column: usize) -> Option<bool>
Returns a positional column as bool if present and typed accordingly.
Sourcepub fn named_int(&self, name: &str) -> Option<i32>
pub fn named_int(&self, name: &str) -> Option<i32>
Returns a named column as i32 if present and typed accordingly.
Sourcepub fn named_uint(&self, name: &str) -> Option<u32>
pub fn named_uint(&self, name: &str) -> Option<u32>
Returns a named column as u32 if present and typed accordingly.
Sourcepub fn named_long(&self, name: &str) -> Option<i64>
pub fn named_long(&self, name: &str) -> Option<i64>
Returns a named column as i64 if present and typed accordingly.
Sourcepub fn named_ulong(&self, name: &str) -> Option<u64>
pub fn named_ulong(&self, name: &str) -> Option<u64>
Returns a named column as u64 if present and typed accordingly.
Sourcepub fn named_double(&self, name: &str) -> Option<f64>
pub fn named_double(&self, name: &str) -> Option<f64>
Returns a named column as f64 if present and typed accordingly.
Sourcepub fn named_string(&self, name: &str) -> Option<&'a str>
pub fn named_string(&self, name: &str) -> Option<&'a str>
Returns a named column as &str if present and typed accordingly.
Sourcepub fn named_bool(&self, name: &str) -> Option<bool>
pub fn named_bool(&self, name: &str) -> Option<bool>
Returns a named column as bool if present and typed accordingly.
Sourcepub fn iter_columns(
&self,
) -> impl Iterator<Item = (&'a str, ColumnType, Value<'a>)> + '_
pub fn iter_columns( &self, ) -> impl Iterator<Item = (&'a str, ColumnType, Value<'a>)> + '_
Iterates over (name, type, value) tuples for the current row.
Sourcepub fn contains(&self, name: &str) -> bool
pub fn contains(&self, name: &str) -> bool
Checks whether the row contains a column with the given name.
Sourcepub fn column_types(&self) -> &'a [ColumnType]
pub fn column_types(&self) -> &'a [ColumnType]
Column types in this row in positional order.
Trait Implementations§
impl<'a> Copy for RowView<'a>
Auto Trait Implementations§
impl<'a> Freeze for RowView<'a>
impl<'a> RefUnwindSafe for RowView<'a>
impl<'a> Send for RowView<'a>
impl<'a> Sync for RowView<'a>
impl<'a> Unpin for RowView<'a>
impl<'a> UnwindSafe for RowView<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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