Type Alias tokio_postgres::types::Oid

source ·
pub type Oid = u32;
Expand description

A Postgres OID.

Trait Implementations§

source§

impl<'a> FromSql<'a> for u32

source§

fn from_sql( _: &Type, raw: &'a [u8] ) -> Result<u32, Box<dyn Error + Sync + Send, Global>>

Creates a new value of this type from a buffer of data of the specified Postgres Type in its binary format. Read more
source§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be created from the specified Postgres Type.
source§

fn from_sql_null( ty: &Type ) -> Result<Self, Box<dyn Error + Sync + Send, Global>>

Creates a new value of this type from a NULL SQL value. Read more
source§

fn from_sql_nullable( ty: &Type, raw: Option<&'a [u8]> ) -> Result<Self, Box<dyn Error + Sync + Send, Global>>

A convenience function that delegates to from_sql and from_sql_null depending on the value of raw.
source§

impl ToSql for u32

source§

fn to_sql( &self, _: &Type, w: &mut BytesMut ) -> Result<IsNull, Box<dyn Error + Sync + Send, Global>>

Converts the value of self into the binary format of the specified Postgres Type, appending it to out. Read more
source§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be converted to the specified Postgres Type.
source§

fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut ) -> Result<IsNull, Box<dyn Error + Sync + Send, Global>>

An adaptor method used internally by Rust-Postgres. Read more
source§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format