Struct tokio_postgres::types::Type

source ·
pub struct Type(/* private fields */);
Expand description

A Postgres type.

Implementations§

source§

impl Type

source

pub const BOOL: Type = _

BOOL - boolean, 'true'/'false'

source

pub const BYTEA: Type = _

BYTEA - variable-length string, binary values escaped

source

pub const CHAR: Type = _

CHAR - single character

source

pub const NAME: Type = _

NAME - 63-byte type for storing system identifiers

source

pub const INT8: Type = _

INT8 - ~18 digit integer, 8-byte storage

source

pub const INT2: Type = _

INT2 - -32 thousand to 32 thousand, 2-byte storage

source

pub const INT2_VECTOR: Type = _

INT2VECTOR - array of int2, used in system tables

source

pub const INT4: Type = _

INT4 - -2 billion to 2 billion integer, 4-byte storage

source

pub const REGPROC: Type = _

REGPROC - registered procedure

source

pub const TEXT: Type = _

TEXT - variable-length string, no limit specified

source

pub const OID: Type = _

OID - object identifier(oid), maximum 4 billion

source

pub const TID: Type = _

TID - (block, offset), physical location of tuple

source

pub const XID: Type = _

XID - transaction id

source

pub const CID: Type = _

CID - command identifier type, sequence in transaction id

source

pub const OID_VECTOR: Type = _

OIDVECTOR - array of oids, used in system tables

source

pub const PG_DDL_COMMAND: Type = _

PG_DDL_COMMAND - internal type for passing CollectedCommand

source

pub const JSON: Type = _

JSON - JSON stored as text

source

pub const XML: Type = _

XML - XML content

source

pub const XML_ARRAY: Type = _

XML[]

source

pub const PG_NODE_TREE: Type = _

PG_NODE_TREE - string representing an internal node tree

source

pub const JSON_ARRAY: Type = _

JSON[]

source

pub const TABLE_AM_HANDLER: Type = _

TABLE_AM_HANDLER

source

pub const XID8_ARRAY: Type = _

XID8[]

source

pub const INDEX_AM_HANDLER: Type = _

INDEX_AM_HANDLER - pseudo-type for the result of an index AM handler function

source

pub const POINT: Type = _

POINT - geometric point '(x, y)'

source

pub const LSEG: Type = _

LSEG - geometric line segment '(pt1,pt2)'

source

pub const PATH: Type = _

PATH - geometric path '(pt1,…)'

source

pub const BOX: Type = _

BOX - geometric box '(lower left,upper right)'

source

pub const POLYGON: Type = _

POLYGON - geometric polygon '(pt1,…)'

source

pub const LINE: Type = _

LINE - geometric line

source

pub const LINE_ARRAY: Type = _

LINE[]

source

pub const CIDR: Type = _

CIDR - network IP address/netmask, network address

source

pub const CIDR_ARRAY: Type = _

CIDR[]

source

pub const FLOAT4: Type = _

FLOAT4 - single-precision floating point number, 4-byte storage

source

pub const FLOAT8: Type = _

FLOAT8 - double-precision floating point number, 8-byte storage

source

pub const UNKNOWN: Type = _

UNKNOWN - pseudo-type representing an undetermined type

source

pub const CIRCLE: Type = _

CIRCLE - geometric circle '(center,radius)'

source

pub const CIRCLE_ARRAY: Type = _

CIRCLE[]

source

pub const MACADDR8: Type = _

MACADDR8 - XX:XX:XX:XX:XX:XX:XX:XX, MAC address

source

pub const MACADDR8_ARRAY: Type = _

MACADDR8[]

source

pub const MONEY: Type = _

MONEY - monetary amounts, $d,ddd.cc

source

pub const MONEY_ARRAY: Type = _

MONEY[]

source

pub const MACADDR: Type = _

MACADDR - XX:XX:XX:XX:XX:XX, MAC address

source

pub const INET: Type = _

INET - IP address/netmask, host address, netmask optional

source

pub const BOOL_ARRAY: Type = _

BOOL[]

source

pub const BYTEA_ARRAY: Type = _

BYTEA[]

source

pub const CHAR_ARRAY: Type = _

CHAR[]

source

pub const NAME_ARRAY: Type = _

NAME[]

source

pub const INT2_ARRAY: Type = _

INT2[]

source

pub const INT2_VECTOR_ARRAY: Type = _

INT2VECTOR[]

source

pub const INT4_ARRAY: Type = _

INT4[]

source

pub const REGPROC_ARRAY: Type = _

REGPROC[]

source

pub const TEXT_ARRAY: Type = _

TEXT[]

source

pub const TID_ARRAY: Type = _

TID[]

source

pub const XID_ARRAY: Type = _

XID[]

source

pub const CID_ARRAY: Type = _

CID[]

source

pub const OID_VECTOR_ARRAY: Type = _

OIDVECTOR[]

source

pub const BPCHAR_ARRAY: Type = _

BPCHAR[]

source

pub const VARCHAR_ARRAY: Type = _

VARCHAR[]

source

pub const INT8_ARRAY: Type = _

INT8[]

source

pub const POINT_ARRAY: Type = _

POINT[]

source

pub const LSEG_ARRAY: Type = _

LSEG[]

source

pub const PATH_ARRAY: Type = _

PATH[]

source

pub const BOX_ARRAY: Type = _

BOX[]

source

pub const FLOAT4_ARRAY: Type = _

FLOAT4[]

source

pub const FLOAT8_ARRAY: Type = _

FLOAT8[]

source

pub const POLYGON_ARRAY: Type = _

POLYGON[]

source

pub const OID_ARRAY: Type = _

OID[]

source

pub const ACLITEM: Type = _

ACLITEM - access control list

source

pub const ACLITEM_ARRAY: Type = _

ACLITEM[]

source

pub const MACADDR_ARRAY: Type = _

MACADDR[]

source

pub const INET_ARRAY: Type = _

INET[]

source

pub const BPCHAR: Type = _

BPCHAR - char(length), blank-padded string, fixed storage length

source

pub const VARCHAR: Type = _

VARCHAR - varchar(length), non-blank-padded string, variable storage length

source

pub const DATE: Type = _

DATE - date

source

pub const TIME: Type = _

TIME - time of day

source

pub const TIMESTAMP: Type = _

TIMESTAMP - date and time

source

pub const TIMESTAMP_ARRAY: Type = _

TIMESTAMP[]

source

pub const DATE_ARRAY: Type = _

DATE[]

source

pub const TIME_ARRAY: Type = _

TIME[]

source

pub const TIMESTAMPTZ: Type = _

TIMESTAMPTZ - date and time with time zone

source

pub const TIMESTAMPTZ_ARRAY: Type = _

TIMESTAMPTZ[]

source

pub const INTERVAL: Type = _

INTERVAL - @ <number> <units>, time interval

source

pub const INTERVAL_ARRAY: Type = _

INTERVAL[]

source

pub const NUMERIC_ARRAY: Type = _

NUMERIC[]

source

pub const CSTRING_ARRAY: Type = _

CSTRING[]

source

pub const TIMETZ: Type = _

TIMETZ - time of day with time zone

source

pub const TIMETZ_ARRAY: Type = _

TIMETZ[]

source

pub const BIT: Type = _

BIT - fixed-length bit string

source

pub const BIT_ARRAY: Type = _

BIT[]

source

pub const VARBIT: Type = _

VARBIT - variable-length bit string

source

pub const VARBIT_ARRAY: Type = _

VARBIT[]

source

pub const NUMERIC: Type = _

NUMERIC - numeric(precision, decimal), arbitrary precision number

source

pub const REFCURSOR: Type = _

REFCURSOR - reference to cursor (portal name)

source

pub const REFCURSOR_ARRAY: Type = _

REFCURSOR[]

source

pub const REGPROCEDURE: Type = _

REGPROCEDURE - registered procedure (with args)

source

pub const REGOPER: Type = _

REGOPER - registered operator

source

pub const REGOPERATOR: Type = _

REGOPERATOR - registered operator (with args)

source

pub const REGCLASS: Type = _

REGCLASS - registered class

source

pub const REGTYPE: Type = _

REGTYPE - registered type

source

pub const REGPROCEDURE_ARRAY: Type = _

REGPROCEDURE[]

source

pub const REGOPER_ARRAY: Type = _

REGOPER[]

source

pub const REGOPERATOR_ARRAY: Type = _

REGOPERATOR[]

source

pub const REGCLASS_ARRAY: Type = _

REGCLASS[]

source

pub const REGTYPE_ARRAY: Type = _

REGTYPE[]

source

pub const RECORD: Type = _

RECORD - pseudo-type representing any composite type

source

pub const CSTRING: Type = _

CSTRING - C-style string

source

pub const ANY: Type = _

ANY - pseudo-type representing any type

source

pub const ANYARRAY: Type = _

ANYARRAY - pseudo-type representing a polymorphic array type

source

pub const VOID: Type = _

VOID - pseudo-type for the result of a function with no real result

source

pub const TRIGGER: Type = _

TRIGGER - pseudo-type for the result of a trigger function

source

pub const LANGUAGE_HANDLER: Type = _

LANGUAGE_HANDLER - pseudo-type for the result of a language handler function

source

pub const INTERNAL: Type = _

INTERNAL - pseudo-type representing an internal data structure

source

pub const ANYELEMENT: Type = _

ANYELEMENT - pseudo-type representing a polymorphic base type

source

pub const RECORD_ARRAY: Type = _

RECORD[]

source

pub const ANYNONARRAY: Type = _

ANYNONARRAY - pseudo-type representing a polymorphic base type that is not an array

source

pub const TXID_SNAPSHOT_ARRAY: Type = _

TXID_SNAPSHOT[]

source

pub const UUID: Type = _

UUID - UUID datatype

source

pub const UUID_ARRAY: Type = _

UUID[]

source

pub const TXID_SNAPSHOT: Type = _

TXID_SNAPSHOT - txid snapshot

source

pub const FDW_HANDLER: Type = _

FDW_HANDLER - pseudo-type for the result of an FDW handler function

source

pub const PG_LSN: Type = _

PG_LSN - PostgreSQL LSN datatype

source

pub const PG_LSN_ARRAY: Type = _

PG_LSN[]

source

pub const TSM_HANDLER: Type = _

TSM_HANDLER - pseudo-type for the result of a tablesample method function

source

pub const PG_NDISTINCT: Type = _

PG_NDISTINCT - multivariate ndistinct coefficients

source

pub const PG_DEPENDENCIES: Type = _

PG_DEPENDENCIES - multivariate dependencies

source

pub const ANYENUM: Type = _

ANYENUM - pseudo-type representing a polymorphic base type that is an enum

source

pub const TS_VECTOR: Type = _

TSVECTOR - text representation for text search

source

pub const TSQUERY: Type = _

TSQUERY - query representation for text search

source

pub const GTS_VECTOR: Type = _

GTSVECTOR - GiST index internal text representation for text search

source

pub const TS_VECTOR_ARRAY: Type = _

TSVECTOR[]

source

pub const GTS_VECTOR_ARRAY: Type = _

GTSVECTOR[]

source

pub const TSQUERY_ARRAY: Type = _

TSQUERY[]

source

pub const REGCONFIG: Type = _

REGCONFIG - registered text search configuration

source

pub const REGCONFIG_ARRAY: Type = _

REGCONFIG[]

source

pub const REGDICTIONARY: Type = _

REGDICTIONARY - registered text search dictionary

source

pub const REGDICTIONARY_ARRAY: Type = _

REGDICTIONARY[]

source

pub const JSONB: Type = _

JSONB - Binary JSON

source

pub const JSONB_ARRAY: Type = _

JSONB[]

source

pub const ANY_RANGE: Type = _

ANYRANGE - pseudo-type representing a range over a polymorphic base type

source

pub const EVENT_TRIGGER: Type = _

EVENT_TRIGGER - pseudo-type for the result of an event trigger function

source

pub const INT4_RANGE: Type = _

INT4RANGE - range of integers

source

pub const INT4_RANGE_ARRAY: Type = _

INT4RANGE[]

source

pub const NUM_RANGE: Type = _

NUMRANGE - range of numerics

source

pub const NUM_RANGE_ARRAY: Type = _

NUMRANGE[]

source

pub const TS_RANGE: Type = _

TSRANGE - range of timestamps without time zone

source

pub const TS_RANGE_ARRAY: Type = _

TSRANGE[]

source

pub const TSTZ_RANGE: Type = _

TSTZRANGE - range of timestamps with time zone

source

pub const TSTZ_RANGE_ARRAY: Type = _

TSTZRANGE[]

source

pub const DATE_RANGE: Type = _

DATERANGE - range of dates

source

pub const DATE_RANGE_ARRAY: Type = _

DATERANGE[]

source

pub const INT8_RANGE: Type = _

INT8RANGE - range of bigints

source

pub const INT8_RANGE_ARRAY: Type = _

INT8RANGE[]

source

pub const JSONPATH: Type = _

JSONPATH - JSON path

source

pub const JSONPATH_ARRAY: Type = _

JSONPATH[]

source

pub const REGNAMESPACE: Type = _

REGNAMESPACE - registered namespace

source

pub const REGNAMESPACE_ARRAY: Type = _

REGNAMESPACE[]

source

pub const REGROLE: Type = _

REGROLE - registered role

source

pub const REGROLE_ARRAY: Type = _

REGROLE[]

source

pub const REGCOLLATION: Type = _

REGCOLLATION - registered collation

source

pub const REGCOLLATION_ARRAY: Type = _

REGCOLLATION[]

source

pub const INT4MULTI_RANGE: Type = _

INT4MULTIRANGE - multirange of integers

source

pub const NUMMULTI_RANGE: Type = _

NUMMULTIRANGE - multirange of numerics

source

pub const TSMULTI_RANGE: Type = _

TSMULTIRANGE - multirange of timestamps without time zone

source

pub const TSTZMULTI_RANGE: Type = _

TSTZMULTIRANGE - multirange of timestamps with time zone

source

pub const DATEMULTI_RANGE: Type = _

DATEMULTIRANGE - multirange of dates

source

pub const INT8MULTI_RANGE: Type = _

INT8MULTIRANGE - multirange of bigints

source

pub const ANYMULTI_RANGE: Type = _

ANYMULTIRANGE - pseudo-type representing a polymorphic base type that is a multirange

source

pub const ANYCOMPATIBLEMULTI_RANGE: Type = _

ANYCOMPATIBLEMULTIRANGE - pseudo-type representing a multirange over a polymorphic common type

source

pub const PG_BRIN_BLOOM_SUMMARY: Type = _

PG_BRIN_BLOOM_SUMMARY - BRIN bloom summary

source

pub const PG_BRIN_MINMAX_MULTI_SUMMARY: Type = _

PG_BRIN_MINMAX_MULTI_SUMMARY - BRIN minmax-multi summary

source

pub const PG_MCV_LIST: Type = _

PG_MCV_LIST - multivariate MCV list

source

pub const PG_SNAPSHOT: Type = _

PG_SNAPSHOT - snapshot

source

pub const PG_SNAPSHOT_ARRAY: Type = _

PG_SNAPSHOT[]

source

pub const XID8: Type = _

XID8 - full transaction id

source

pub const ANYCOMPATIBLE: Type = _

ANYCOMPATIBLE - pseudo-type representing a polymorphic common type

source

pub const ANYCOMPATIBLEARRAY: Type = _

ANYCOMPATIBLEARRAY - pseudo-type representing an array of polymorphic common type elements

source

pub const ANYCOMPATIBLENONARRAY: Type = _

ANYCOMPATIBLENONARRAY - pseudo-type representing a polymorphic common type that is not an array

source

pub const ANYCOMPATIBLE_RANGE: Type = _

ANYCOMPATIBLERANGE - pseudo-type representing a range over a polymorphic common type

source

pub const INT4MULTI_RANGE_ARRAY: Type = _

INT4MULTIRANGE[]

source

pub const NUMMULTI_RANGE_ARRAY: Type = _

NUMMULTIRANGE[]

source

pub const TSMULTI_RANGE_ARRAY: Type = _

TSMULTIRANGE[]

source

pub const TSTZMULTI_RANGE_ARRAY: Type = _

TSTZMULTIRANGE[]

source

pub const DATEMULTI_RANGE_ARRAY: Type = _

DATEMULTIRANGE[]

source

pub const INT8MULTI_RANGE_ARRAY: Type = _

INT8MULTIRANGE[]

source§

impl Type

source

pub fn new(name: String, oid: u32, kind: Kind, schema: String) -> Type

Creates a new Type.

source

pub fn from_oid(oid: u32) -> Option<Type>

Returns the Type corresponding to the provided Oid if it corresponds to a built-in type.

source

pub fn oid(&self) -> u32

Returns the OID of the Type.

source

pub fn kind(&self) -> &Kind

Returns the kind of this type.

source

pub fn schema(&self) -> &str

Returns the schema of this type.

source

pub fn name(&self) -> &str

Returns the name of this type.

Trait Implementations§

source§

impl Clone for Type

source§

fn clone(&self) -> Type

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Type

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for Type

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Hash for Type

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Type

source§

fn eq(&self, other: &Type) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Type

source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

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

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more