Struct mysql_async::Row

source ·
pub struct Row { /* private fields */ }
Expand description

Client side representation of a MySql row.

It allows you to move column values out of a row with Row::take method but note that it makes row incomplete. Calls to from_row_opt on incomplete row will return Error::FromRowError and also numerical indexing on taken columns will panic.

Implementations§

Returns length of a row.

Returns columns of this row.

Returns columns of this row.

Returns reference to the value of a column with index index if it exists and wasn’t taken by Row::take method.

Non panicking version of row[usize].

Will copy value at index index if it was not taken by Row::take earlier, then will convert it to T.

Will copy value at index index if it was not taken by Row::take or Row::take_opt earlier, then will attempt convert it to T. Unlike Row::get, Row::get_opt will allow you to directly handle errors if the value could not be converted to T.

Will take value of a column with index index if it exists and wasn’t taken earlier then will converts it to T.

Will take value of a column with index index if it exists and wasn’t taken earlier then will attempt to convert it to T. Unlike Row::take, Row::take_opt will allow you to directly handle errors if the value could not be converted to T.

Unwraps values of a row.

Panics

Panics if any of columns was taken by take method.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.