pub enum OwnedPostgresValue {
Smallint(i16),
Integer(i32),
Bigint(i64),
Real(f32),
DoublePrecision(f64),
Text(String),
Bytea(Vec<u8>),
Boolean(bool),
Array(Vec<Self>),
Enum(Box<dyn PostgresEnum>),
Null,
}Expand description
Owned version of PostgresValue that doesn’t borrow data
Variants§
Smallint(i16)
SMALLINT values (16-bit signed integer)
Integer(i32)
INTEGER values (32-bit signed integer)
Bigint(i64)
BIGINT values (64-bit signed integer)
Real(f32)
REAL values (32-bit floating point)
DoublePrecision(f64)
DOUBLE PRECISION values (64-bit floating point)
Text(String)
TEXT, VARCHAR, CHAR values (owned)
Bytea(Vec<u8>)
BYTEA values (owned binary data)
Boolean(bool)
BOOLEAN values
Array(Vec<Self>)
Array of any PostgreSQL type
Enum(Box<dyn PostgresEnum>)
PostgreSQL ENUM values (native enum types via CREATE TYPE ... AS ENUM)
Null
NULL value
Implementations§
Source§impl OwnedPostgresValue
impl OwnedPostgresValue
Sourcepub fn as_value(&self) -> PostgresValue<'_>
pub fn as_value(&self) -> PostgresValue<'_>
Returns a borrowed PostgresValue view of this owned value.
Sourcepub fn convert<T: FromPostgresValue>(self) -> Result<T, DrizzleError>
pub fn convert<T: FromPostgresValue>(self) -> Result<T, DrizzleError>
Convert this PostgreSQL value to a Rust type using the FromPostgresValue trait.
§Errors
Returns DrizzleError::ConversionError when the stored variant’s
native type does not match the target type T.
Sourcepub fn convert_ref<T: FromPostgresValue>(&self) -> Result<T, DrizzleError>
pub fn convert_ref<T: FromPostgresValue>(&self) -> Result<T, DrizzleError>
Convert a reference to this PostgreSQL value to a Rust type.
§Errors
Returns DrizzleError::ConversionError when the stored variant’s
native type does not match the target type T.
Trait Implementations§
Source§impl Clone for OwnedPostgresValue
impl Clone for OwnedPostgresValue
Source§fn clone(&self) -> OwnedPostgresValue
fn clone(&self) -> OwnedPostgresValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OwnedPostgresValue
impl Debug for OwnedPostgresValue
Source§impl Default for OwnedPostgresValue
impl Default for OwnedPostgresValue
Source§fn default() -> OwnedPostgresValue
fn default() -> OwnedPostgresValue
Source§impl Display for OwnedPostgresValue
impl Display for OwnedPostgresValue
Source§impl<'a> From<&'a OwnedPostgresValue> for Cow<'a, OwnedPostgresValue>
impl<'a> From<&'a OwnedPostgresValue> for Cow<'a, OwnedPostgresValue>
Source§fn from(value: &'a OwnedPostgresValue) -> Self
fn from(value: &'a OwnedPostgresValue) -> Self
Source§impl<'a> From<&'a OwnedPostgresValue> for PostgresValue<'a>
impl<'a> From<&'a OwnedPostgresValue> for PostgresValue<'a>
Source§fn from(value: &'a OwnedPostgresValue) -> Self
fn from(value: &'a OwnedPostgresValue) -> Self
Source§impl<'a> From<&PostgresValue<'a>> for OwnedPostgresValue
impl<'a> From<&PostgresValue<'a>> for OwnedPostgresValue
Source§fn from(value: &PostgresValue<'a>) -> Self
fn from(value: &PostgresValue<'a>) -> Self
Source§impl From<&String> for OwnedPostgresValue
impl From<&String> for OwnedPostgresValue
Source§impl From<&str> for OwnedPostgresValue
impl From<&str> for OwnedPostgresValue
Source§impl From<OwnedPostgresValue> for SQL<'_, OwnedPostgresValue>
impl From<OwnedPostgresValue> for SQL<'_, OwnedPostgresValue>
Source§fn from(value: OwnedPostgresValue) -> Self
fn from(value: OwnedPostgresValue) -> Self
Source§impl From<OwnedPostgresValue> for Cow<'_, OwnedPostgresValue>
impl From<OwnedPostgresValue> for Cow<'_, OwnedPostgresValue>
Source§fn from(value: OwnedPostgresValue) -> Self
fn from(value: OwnedPostgresValue) -> Self
Source§impl From<OwnedPostgresValue> for PostgresValue<'_>
impl From<OwnedPostgresValue> for PostgresValue<'_>
Source§fn from(value: OwnedPostgresValue) -> Self
fn from(value: OwnedPostgresValue) -> Self
Source§impl<'a> From<PostgresValue<'a>> for OwnedPostgresValue
impl<'a> From<PostgresValue<'a>> for OwnedPostgresValue
Source§fn from(value: PostgresValue<'a>) -> Self
fn from(value: PostgresValue<'a>) -> Self
Source§impl From<String> for OwnedPostgresValue
impl From<String> for OwnedPostgresValue
Source§impl From<bool> for OwnedPostgresValue
impl From<bool> for OwnedPostgresValue
Source§impl From<f32> for OwnedPostgresValue
impl From<f32> for OwnedPostgresValue
Source§impl From<f64> for OwnedPostgresValue
impl From<f64> for OwnedPostgresValue
Source§impl From<i16> for OwnedPostgresValue
impl From<i16> for OwnedPostgresValue
Source§impl From<i32> for OwnedPostgresValue
impl From<i32> for OwnedPostgresValue
Source§impl From<i64> for OwnedPostgresValue
impl From<i64> for OwnedPostgresValue
Source§impl PartialEq for OwnedPostgresValue
impl PartialEq for OwnedPostgresValue
Source§impl SQLParam for OwnedPostgresValue
impl SQLParam for OwnedPostgresValue
Source§const DIALECT: Dialect = drizzle_core::Dialect::PostgreSQL
const DIALECT: Dialect = drizzle_core::Dialect::PostgreSQL
Source§type DialectMarker = PostgresDialect
type DialectMarker = PostgresDialect
impl StructuralPartialEq for OwnedPostgresValue
Source§impl TryFrom<OwnedPostgresValue> for i16
impl TryFrom<OwnedPostgresValue> for i16
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for i32
impl TryFrom<OwnedPostgresValue> for i32
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for i64
impl TryFrom<OwnedPostgresValue> for i64
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for f32
impl TryFrom<OwnedPostgresValue> for f32
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for f64
impl TryFrom<OwnedPostgresValue> for f64
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for String
impl TryFrom<OwnedPostgresValue> for String
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Box<String>
impl TryFrom<OwnedPostgresValue> for Box<String>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Rc<String>
impl TryFrom<OwnedPostgresValue> for Rc<String>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Arc<String>
impl TryFrom<OwnedPostgresValue> for Arc<String>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Box<str>
impl TryFrom<OwnedPostgresValue> for Box<str>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Rc<str>
impl TryFrom<OwnedPostgresValue> for Rc<str>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Arc<str>
impl TryFrom<OwnedPostgresValue> for Arc<str>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Vec<u8>
impl TryFrom<OwnedPostgresValue> for Vec<u8>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Box<Vec<u8>>
impl TryFrom<OwnedPostgresValue> for Box<Vec<u8>>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Rc<Vec<u8>>
impl TryFrom<OwnedPostgresValue> for Rc<Vec<u8>>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for Arc<Vec<u8>>
impl TryFrom<OwnedPostgresValue> for Arc<Vec<u8>>
Source§type Error = DrizzleError
type Error = DrizzleError
Source§impl TryFrom<OwnedPostgresValue> for bool
impl TryFrom<OwnedPostgresValue> for bool
Source§type Error = DrizzleError
type Error = DrizzleError
Auto Trait Implementations§
impl !RefUnwindSafe for OwnedPostgresValue
impl !UnwindSafe for OwnedPostgresValue
impl Freeze for OwnedPostgresValue
impl Send for OwnedPostgresValue
impl Sync for OwnedPostgresValue
impl Unpin for OwnedPostgresValue
impl UnsafeUnpin for OwnedPostgresValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<Mk> MarkerAggValidFor<()> for Mk
impl<Scope> ScopeSatisfies<Nil, ()> for Scope
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more