Skip to main content

SameShape

Trait SameShape 

Source
pub trait SameShape<Other> { }
Expand description

Two selections produce the same row: the same column names, in the same order, decoding to the same types. A one-column selection decodes to a bare value rather than a Row, and two of those match when the value types do — there is no name to disagree about. Names as well as types, because a UNION branch or a CTE body whose columns merely happen to be type-compatible would otherwise splice in transposed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SameShape<DateTime<Utc>> for DateTime<Utc>

Source§

impl SameShape<Decimal> for Decimal

Source§

impl SameShape<NaiveDate> for NaiveDate

Source§

impl SameShape<Option<DateTime<Utc>>> for Option<DateTime<Utc>>

Source§

impl SameShape<Option<Decimal>> for Option<Decimal>

Source§

impl SameShape<Option<NaiveDate>> for Option<NaiveDate>

Source§

impl SameShape<Option<String>> for Option<String>

Source§

impl SameShape<Option<Uuid>> for Option<Uuid>

Source§

impl SameShape<Option<Vec<u8>>> for Option<Vec<u8>>

Source§

impl SameShape<Option<bool>> for Option<bool>

Source§

impl SameShape<Option<f64>> for Option<f64>

Source§

impl SameShape<Option<i32>> for Option<i32>

Source§

impl SameShape<Option<i64>> for Option<i64>

Source§

impl SameShape<String> for String

Source§

impl SameShape<Uuid> for Uuid

Source§

impl SameShape<Vec<u8>> for Vec<u8>

Source§

impl SameShape<bool> for bool

Source§

impl SameShape<f64> for f64

Source§

impl SameShape<i32> for i32

Source§

impl SameShape<i64> for i64

Implementors§

Source§

impl SameShape<RowNil> for RowNil

Source§

impl<A, B> SameShape<Row<B>> for Row<A>
where A: SameShape<B>,

Source§

impl<K1, K2, V, Tail1, Tail2> SameShape<RowCons<K2, V, Tail2>> for RowCons<K1, V, Tail1>
where K1: SameNameAs<K2>, Tail1: SameShape<Tail2>,