[−][src]Enum pg_wire::PgType
Represents PostgreSQL data type and methods to send over wire
Variants
Represents PostgreSQL smallint
data type
Represents PostgreSQL integer
(or int
) data type
Represents PostgreSQL bigint
data type
Represents PostgreSQL character(n)
(or char(n)
) data type
Represents PostgreSQL character varying(n)
(or varchar(n)
) data type
Represents PostgreSQL boolean
data type
Implementations
impl PgType
[src]
pub fn type_oid(&self) -> Oid
[src]
Returns PostgreSQL type Oid
pub fn type_len(&self) -> i16
[src]
Returns PostgreSQL type length
pub fn decode(&self, format: &PgFormat, raw: &[u8]) -> Result<Value, String>
[src]
Deserializes a value of this type from raw
using the specified format
.
pub fn from_oid(oid: Oid) -> Result<Option<PgType>, NotSupportedOid>
[src]
Returns the type corresponding to the provided Oid, if the it is known.
Trait Implementations
impl Clone for PgType
[src]
impl Copy for PgType
[src]
impl Debug for PgType
[src]
impl Display for PgType
[src]
impl PartialEq<PgType> for PgType
[src]
impl StructuralPartialEq for PgType
[src]
Auto Trait Implementations
impl RefUnwindSafe for PgType
impl Send for PgType
impl Sync for PgType
impl Unpin for PgType
impl UnwindSafe for PgType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,