pub struct PgType<'a> {Show 20 fields
pub oid: u32,
pub typname: &'a str,
pub regtype: &'a str,
pub typnamespace: u32,
pub typowner: u32,
pub typlen: i16,
pub typbyval: bool,
pub typtype: &'a str,
pub typcategory: &'a str,
pub typisprefered: bool,
pub typisdefined: bool,
pub typrelid: u32,
pub typsubscript: &'static str,
pub typelem: u32,
pub typarray: u32,
pub typalign: &'static str,
pub typstorage: &'static str,
pub typbasetype: u32,
pub typreceive: &'static str,
pub typreceive_oid: u32,
}Expand description
A Postgres type. Similar structure as pg_catalog.pg_type. https://www.postgresql.org/docs/14/catalog-pg-type.html
Fields§
§oid: u32§typname: &'a strData type name
regtype: &'a str§typnamespace: u32The OID of the namespace that contains this type. references pg_namespace.oid
typowner: u32Owner of the type. references pg_authid.oid
typlen: i16For a fixed-size type, typlen is the number of bytes in the internal representation of the type. But for a variable-length type, typlen is negative. -1 indicates a “varlena” type (one that has a length word), -2 indicates a null-terminated C string.
typbyval: bool§typtype: &'a str§typcategory: &'a str§typisprefered: bool§typisdefined: bool§typrelid: u32§typsubscript: &'static str§typelem: u32§typarray: u32§typalign: &'static str§typstorage: &'static str§typbasetype: u32§typreceive: &'static str§typreceive_oid: u32Implementations§
Source§impl PgType<'_>
impl PgType<'_>
pub fn get_typinput(&self) -> String
pub const fn is_binary_supported(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PgType<'a>
impl<'a> RefUnwindSafe for PgType<'a>
impl<'a> Send for PgType<'a>
impl<'a> Sync for PgType<'a>
impl<'a> Unpin for PgType<'a>
impl<'a> UnsafeUnpin for PgType<'a>
impl<'a> UnwindSafe for PgType<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more