diesel::pg

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

Source

fn lookup(&self) -> NonZeroU32

Lookup the type oid for the current value

Implementations on Foreign Types§

Source§

impl TypeOidLookup for NonZeroU32

Source§

fn lookup(&self) -> NonZeroU32

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

Implementors§

Source§

impl TypeOidLookup for PgValue<'_>

Source§

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