Trait diesel::pg::TypeOidLookup

source ·
pub trait TypeOidLookup {
    // Required method
    fn lookup(&self) -> NonZeroU32;
Available on crate features postgres_backend and i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
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§


fn lookup(&self) -> NonZeroU32

Lookup the type oid for the current value

Implementations on Foreign Types§


impl TypeOidLookup for NonZeroU32


fn lookup(&self) -> NonZeroU32

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.



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


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