diesel::pg

Trait TypeOidLookup

source
pub trait TypeOidLookup {
    // Required method
    fn lookup(&self) -> NonZeroU32;
}
Expand description

This is a helper trait to defer a type oid lookup to a later point in time

This is mainly used in the PgConnection implementation so that we do not need to call into libpq if we do not need the type oid.

Backend implementations based on pure rustc database connection crates can likely reuse the implementation for NonZeroU32 here instead of providing their own custom implementation

Required Methods§

source

fn lookup(&self) -> NonZeroU32

Lookup the type oid for the current value

Implementations on Foreign Types§

source§

impl TypeOidLookup for NonZeroU32

Implementors§

source§

impl<'a> TypeOidLookup for PgValue<'a>

source§

impl<F> TypeOidLookup for F
where F: Fn() -> NonZeroU32,