[−][src]Struct tiberius::Row
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]
I: QueryIdx,
R: TryFrom<&'a ColumnData<'a>, Error = Error>,
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]
I: QueryIdx,
R: TryFrom<&'a ColumnData<'a>, Error = Error>,
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]
R: TryFrom<ColumnData<'a>, Error = Error>,
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,