pub trait MySQLRowAccess {
// Required method
fn value_at(
&self,
offset: usize,
) -> Result<Option<MySQLValue<'_>>, DrizzleError>;
// Provided method
fn is_bit_at(&self, _offset: usize) -> bool { ... }
}Expand description
A driver row whose cells can be read as MySQLValues.
Implemented for [OwnedMySQLValue], Vec<OwnedMySQLValue>,
[MySQLValue], and (with mysql-common) mysql_common::Row.
Implementations must return Ok(None) for a missing or already consumed
cell, and must not panic on a bad offset or conversion.
Required Methods§
Sourcefn value_at(
&self,
offset: usize,
) -> Result<Option<MySQLValue<'_>>, DrizzleError>
fn value_at( &self, offset: usize, ) -> Result<Option<MySQLValue<'_>>, DrizzleError>
Returns the cell at offset (0-based), or None if there is none.
§Errors
Returns an error when the driver cannot read the row.
Provided Methods§
Sourcefn is_bit_at(&self, _offset: usize) -> bool
fn is_bit_at(&self, _offset: usize) -> bool
Returns whether the cell at offset is a BIT column, whose bytes
are a packed big-endian number.
The default is false. Drivers override it from their column
metadata, so integer and bool decoders read BIT bytes as a number
while byte decoders keep them as bytes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".