pub enum CastTarget {
Boolean,
Smallint,
Integer,
Bigint,
Numeric(Option<NumericTypmod>),
Text,
Varchar(Option<CharLength>),
Bpchar(Option<CharLength>),
Date,
Timestamp(Option<u8>),
TimestampTz(Option<u8>),
}Expand description
The type a literal is cast to, with its modifier.
Variants§
Boolean
boolean.
Smallint
smallint.
Integer
integer.
Bigint
bigint.
Numeric(Option<NumericTypmod>)
numeric, or numeric(p, s) with a modifier.
Text
text.
Varchar(Option<CharLength>)
varchar, or varchar(n) with a length.
Bpchar(Option<CharLength>)
bpchar, or char(n) with a length, where a bare char is char(1).
Date
date.
Timestamp(Option<u8>)
timestamp, or timestamp(p) with a precision, where one above 6 is 6.
TimestampTz(Option<u8>)
timestamptz, or timestamptz(p) with a precision, where one above 6 is 6.
Implementations§
Trait Implementations§
Source§impl Clone for CastTarget
impl Clone for CastTarget
impl Copy for CastTarget
Source§impl Debug for CastTarget
impl Debug for CastTarget
impl Eq for CastTarget
Source§impl Hash for CastTarget
impl Hash for CastTarget
Source§impl PartialEq for CastTarget
impl PartialEq for CastTarget
impl StructuralPartialEq for CastTarget
Auto Trait Implementations§
impl Forget for CastTarget
impl Freeze for CastTarget
impl RefUnwindSafe for CastTarget
impl Send for CastTarget
impl Sync for CastTarget
impl Unpin for CastTarget
impl UnsafeUnpin for CastTarget
impl UnwindSafe for CastTarget
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