logo
pub enum Value {
Show 28 variants Bool(Option<bool>), TinyInt(Option<i8>), SmallInt(Option<i16>), Int(Option<i32>), BigInt(Option<i64>), TinyUnsigned(Option<u8>), SmallUnsigned(Option<u16>), Unsigned(Option<u32>), BigUnsigned(Option<u64>), Float(Option<f32>), Double(Option<f64>), String(Option<Box<String>>), Bytes(Option<Box<Vec<u8>>>), Json(Option<Box<Json>>), ChronoDate(Option<Box<NaiveDate>>), ChronoTime(Option<Box<NaiveTime>>), ChronoDateTime(Option<Box<NaiveDateTime>>), ChronoDateTimeUtc(Option<Box<DateTime<Utc>>>), ChronoDateTimeLocal(Option<Box<DateTime<Local>>>), ChronoDateTimeWithTimeZone(Option<Box<DateTime<FixedOffset>>>), TimeDate(Option<Box<Date>>), TimeTime(Option<Box<Time>>), TimeDateTime(Option<Box<PrimitiveDateTime>>), TimeDateTimeWithTimeZone(Option<Box<OffsetDateTime>>), Uuid(Option<Box<Uuid>>), Decimal(Option<Box<Decimal>>), BigDecimal(Option<Box<BigDecimal>>), Array(Option<Box<Vec<Value>>>),
}
Expand description

Value variants

We want Value to be exactly 1 pointer sized, so anything larger should be boxed.

Variants

Bool(Option<bool>)

TinyInt(Option<i8>)

SmallInt(Option<i16>)

Int(Option<i32>)

BigInt(Option<i64>)

TinyUnsigned(Option<u8>)

SmallUnsigned(Option<u16>)

Unsigned(Option<u32>)

BigUnsigned(Option<u64>)

Float(Option<f32>)

Double(Option<f64>)

String(Option<Box<String>>)

Bytes(Option<Box<Vec<u8>>>)

Json(Option<Box<Json>>)

This is supported on crate feature with-json only.

ChronoDate(Option<Box<NaiveDate>>)

This is supported on crate feature with-chrono only.

ChronoTime(Option<Box<NaiveTime>>)

This is supported on crate feature with-chrono only.

ChronoDateTime(Option<Box<NaiveDateTime>>)

This is supported on crate feature with-chrono only.

ChronoDateTimeUtc(Option<Box<DateTime<Utc>>>)

This is supported on crate feature with-chrono only.

ChronoDateTimeLocal(Option<Box<DateTime<Local>>>)

This is supported on crate feature with-chrono only.

ChronoDateTimeWithTimeZone(Option<Box<DateTime<FixedOffset>>>)

This is supported on crate feature with-chrono only.

TimeDate(Option<Box<Date>>)

This is supported on crate feature with-time only.

TimeTime(Option<Box<Time>>)

This is supported on crate feature with-time only.

TimeDateTime(Option<Box<PrimitiveDateTime>>)

This is supported on crate feature with-time only.

TimeDateTimeWithTimeZone(Option<Box<OffsetDateTime>>)

This is supported on crate feature with-time only.

Uuid(Option<Box<Uuid>>)

This is supported on crate feature with-uuid only.

Decimal(Option<Box<Decimal>>)

This is supported on crate feature with-rust_decimal only.

BigDecimal(Option<Box<BigDecimal>>)

This is supported on crate feature with-bigdecimal only.

Array(Option<Box<Vec<Value>>>)

This is supported on crate feature postgres-array only.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Converts the value of self into the binary format of the specified Postgres Type, appending it to out. Read more

Determines if a value of this type can be converted to the specified Postgres Type. Read more

An adaptor method used internally by Rust-Postgres. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns a reference to self as a ToSql trait object.

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.