pub trait RowCount: Sealed {
type Get<R>;
// Required method
fn first<R>(row: Option<R>) -> Result<Self::Get<R>, DrizzleError>;
}Expand description
How many rows a query returns, as far as its type knows: ExactlyOne
or ZeroOrMore. It decides what .get() returns.
Required Associated Types§
Required Methods§
Sourcefn first<R>(row: Option<R>) -> Result<Self::Get<R>, DrizzleError>
fn first<R>(row: Option<R>) -> Result<Self::Get<R>, DrizzleError>
The first row of a result as Self::Get.
§Errors
ExactlyOne returns DrizzleError::NotFound when the database
returned no row.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".