[][src]Struct sqlx::postgres::PgTypeInfo

pub struct PgTypeInfo(_);
This is supported on crate feature postgres only.

Type information for a PostgreSQL type.

Implementations

impl PgTypeInfo[src]

pub fn kind(&self) -> &PgTypeKind[src]

Returns the kind (simple, array, enum, etc.) for this type.

pub const fn with_name(name: &'static str) -> PgTypeInfo[src]

Create a PgTypeInfo from a type name.

The OID for the type will be fetched from Postgres on use of a value of this type. The fetched OID will be cached per-connection.

pub const fn with_oid(oid: u32) -> PgTypeInfo[src]

Create a PgTypeInfo from an OID.

Note that the OID for a type is very dependent on the environment. If you only ever use one database or if this is an unhandled build-in type, you should be fine. Otherwise, you will be better served using with_name.

Trait Implementations

impl Clone for PgTypeInfo[src]

impl Debug for PgTypeInfo[src]

impl Deref for PgTypeInfo[src]

type Target = PgType

The resulting type after dereferencing.

impl Display for PgTypeInfo[src]

impl From<PgTypeInfo> for AnyTypeInfo[src]

impl PartialEq<PgTypeInfo> for PgTypeInfo[src]

impl StructuralPartialEq for PgTypeInfo[src]

impl TypeInfo for PgTypeInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,