Skip to main content

Timestamp

Type Alias Timestamp 

Source
pub type Timestamp = NaiveDateTime;
Available on crate feature chrono and crate feature date and (crate features chrono or jiff) only.
Expand description

Rust type for date.

Aliased Type§

pub struct Timestamp { /* private fields */ }

Trait Implementations§

Source§

impl FromSql for Timestamp

Source§

fn from_text(ty: &Type, raw: Option<&str>) -> Result<Self>

Create a new struct from the text representation. Read more
Source§

fn from_binary(ty: &Type, raw: Option<&[u8]>) -> Result<Self>

Create a new struct from the binary representation. Read more
Source§

fn from_sql(ty: &Type, format: Format, raw: Option<&[u8]>) -> Result<Self>

Create a new struct from SQL value.
Source§

fn error<T: Debug>(pg_type: &Type, raw: T) -> Error

Source§

impl Simple for Timestamp

Source§

impl ToSql for Timestamp

Source§

fn ty(&self) -> Type

The corresponding SQL type
Source§

fn to_text(&self) -> Result<Option<String>>

Convert the value to text format Read more
Source§

fn to_binary(&self) -> Result<Option<Vec<u8>>>

Convert the value to binary format Read more
Source§

fn error(&self, message: &str) -> Error