Skip to main content

RowView

Struct RowView 

Source
pub struct RowView<'a> { /* private fields */ }
Expand description

Borrowed view over a single row of a Data table.

Implementations§

Source§

impl<'a> RowView<'a>

Source

pub fn value(&self, column: usize) -> Option<Value<'a>>

Returns a typed cell by positional column index.

Source

pub fn named_value(&self, name: &str) -> Option<Value<'a>>

Returns a typed cell by column name.

Source

pub fn int(&self, column: usize) -> Option<i32>

Returns a positional column as i32 if present and typed accordingly.

Source

pub fn uint(&self, column: usize) -> Option<u32>

Returns a positional column as u32 if present and typed accordingly.

Source

pub fn long(&self, column: usize) -> Option<i64>

Returns a positional column as i64 if present and typed accordingly.

Source

pub fn ulong(&self, column: usize) -> Option<u64>

Returns a positional column as u64 if present and typed accordingly.

Source

pub fn double(&self, column: usize) -> Option<f64>

Returns a positional column as f64 if present and typed accordingly.

Source

pub fn string(&self, column: usize) -> Option<&'a str>

Returns a positional column as &str if present and typed accordingly.

Source

pub fn bool(&self, column: usize) -> Option<bool>

Returns a positional column as bool if present and typed accordingly.

Source

pub fn named_int(&self, name: &str) -> Option<i32>

Returns a named column as i32 if present and typed accordingly.

Source

pub fn named_uint(&self, name: &str) -> Option<u32>

Returns a named column as u32 if present and typed accordingly.

Source

pub fn named_long(&self, name: &str) -> Option<i64>

Returns a named column as i64 if present and typed accordingly.

Source

pub fn named_ulong(&self, name: &str) -> Option<u64>

Returns a named column as u64 if present and typed accordingly.

Source

pub fn named_double(&self, name: &str) -> Option<f64>

Returns a named column as f64 if present and typed accordingly.

Source

pub fn named_string(&self, name: &str) -> Option<&'a str>

Returns a named column as &str if present and typed accordingly.

Source

pub fn named_bool(&self, name: &str) -> Option<bool>

Returns a named column as bool if present and typed accordingly.

Source

pub fn iter_columns( &self, ) -> impl Iterator<Item = (&'a str, ColumnType, Value<'a>)> + '_

Iterates over (name, type, value) tuples for the current row.

Source

pub fn contains(&self, name: &str) -> bool

Checks whether the row contains a column with the given name.

Source

pub fn n_columns(&self) -> usize

Number of columns in this row.

Source

pub fn column_types(&self) -> &'a [ColumnType]

Column types in this row in positional order.

Trait Implementations§

Source§

impl<'a> Clone for RowView<'a>

Source§

fn clone(&self) -> RowView<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for RowView<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.