[][src]Struct tiberius::Row

pub struct Row { /* fields omitted */ }

A row of data from a query.

Implementations

impl Row[src]

pub fn columns(&self) -> &[Column][src]

Columns defining the row data. Columns listed here are in the same order as the resulting data.

pub fn len(&self) -> usize[src]

Returns the amount of columns in the row

pub fn get<'a, I, R>(&'a self, idx: I) -> R where
    I: QueryIdx,
    R: TryFrom<&'a ColumnData<'a>, Error = Error>, 
[src]

Retrieve a column's value for a given column index

Panics

  • the requested type conversion (SQL->Rust) is not possible
  • the given index is out of bounds (column does not exist)

pub fn try_get<'a, I, R>(&'a self, idx: I) -> Result<Option<R>> where
    I: QueryIdx,
    R: TryFrom<&'a ColumnData<'a>, Error = Error>, 
[src]

Retrieve a column's value for a given column index.

Returns None if:

  • Index is out of bounds.
  • Column is null.

Returns an error if:

  • Column data conversion fails.

pub fn into_first<'a, R>(self) -> Result<Option<R>> where
    R: TryFrom<ColumnData<'a>, Error = Error>, 
[src]

Takes the first column data out from the row, consuming the row.

Returns None if:

  • Row has no data.
  • Column is null.

Returns an error if:

  • Column data conversion fails.

Trait Implementations

impl Debug for Row[src]

impl IntoIterator for Row[src]

type Item = ColumnData<'static>

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl RefUnwindSafe for Row

impl Send for Row

impl Sync for Row

impl Unpin for Row

impl UnwindSafe for Row

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,