pub enum CastValue {
Show 15 variants
Boolean(bool),
Smallint(i16),
Integer(i32),
Bigint(i64),
Numeric(PgNumeric),
Text(String),
Bpchar(PgBpchar<'static>),
Date(PgDate),
Timestamp(PgTimestamp),
TimestampTz(PgTimestampTz),
Time(PgTime),
TimeTz(PgTimeTz),
Jsonb(PgJsonb),
Uuid(PgUuid),
Interval(PgInterval),
}Expand description
The value a cast produces or takes, printed by Display as the type’s output
function prints it under the default DateStyle of ISO.
Variants§
Boolean(bool)
A boolean, printed t or f.
Smallint(i16)
A smallint.
Integer(i32)
An integer.
Bigint(i64)
A bigint.
Numeric(PgNumeric)
A numeric.
Text(String)
A text or varchar.
Bpchar(PgBpchar<'static>)
A char(n), blank-padded to its length as PostgreSQL holds it, equal to another as
PostgreSQL finds it, ignoring trailing blanks.
Date(PgDate)
A date.
Timestamp(PgTimestamp)
A timestamp.
TimestampTz(PgTimestampTz)
A timestamptz, printed as under TimeZone UTC.
Time(PgTime)
A time.
TimeTz(PgTimeTz)
A timetz, printed with the offset it holds.
Jsonb(PgJsonb)
A jsonb.
Uuid(PgUuid)
A uuid.
Interval(PgInterval)
An interval, printed under the default IntervalStyle of postgres, equal to another
as PostgreSQL finds it, with a month as 30 days and a day as 24 hours.
Trait Implementations§
Source§impl Display for CastValue
Each type’s output function under DateStyle ISO, IntervalStyle postgres and
TimeZone UTC.
impl Display for CastValue
Each type’s output function under DateStyle ISO, IntervalStyle postgres and
TimeZone UTC.
impl Eq for CastValue
impl StructuralPartialEq for CastValue
Auto Trait Implementations§
impl Forget for CastValue
impl Freeze for CastValue
impl Move for CastValue
impl RefUnwindSafe for CastValuewhere
String: RefUnwindSafe,
impl Send for CastValue
impl Sync for CastValue
impl Unpin for CastValue
impl UnsafeUnpin for CastValuewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
PhantomData<Token>: UnsafeUnpin,
impl UnwindSafe for CastValue
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