diesel::deserialize

Trait StaticallySizedRow

Source
pub trait StaticallySizedRow<ST, DB: Backend>: FromSqlRow<ST, DB> {
    const FIELD_COUNT: usize;
}
Expand description

A marker trait indicating that the corresponding type consumes a static at compile time known number of field

There is normally no need to implement this trait. Diesel provides wild card impls for all types that implement FromSql<ST, DB> or Queryable<ST, DB> where the size of ST is known

Required Associated Constants§

Source

const FIELD_COUNT: usize

The number of fields that this type will consume.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
where ST: SqlTypeOrSelectable + TupleSize, T: Queryable<ST, DB>, DB: Backend,

Source§

const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE