Skip to main content

RowCount

Trait RowCount 

Source
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§

Source

type Get<R>

What .get() returns for rows of type R.

Required Methods§

Source

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".

Implementors§