Struct contack::date_time::DateTime [−][src]
pub struct DateTime {
pub year: i32,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
}
Expand description
Represents some time. Can be converted from chrono.
Fields
year: i32
The years since 0 CE
month: u8
The month of the year 1-12
day: u8
The day of the month 1-(28|30|31)
hour: u8
The hour in the day 0-23
minute: u8
The minute in the hour
second: u8
The second in the minute
Implementations
Trait Implementations
type Expression = Bound<Nullable<Timestamp>, Self>
type Expression = Bound<Nullable<Timestamp>, Self>
The expression being returned
Perform the conversion
type Expression = Bound<Nullable<Timestamp>, Self>
type Expression = Bound<Nullable<Timestamp>, Self>
The expression being returned
Perform the conversion
type Expression = Bound<Timestamp, Self>
type Expression = Bound<Timestamp, Self>
The expression being returned
Perform the conversion
type Expression = Bound<Timestamp, Self>
type Expression = Bound<Timestamp, Self>
The expression being returned
Perform the conversion
impl<__ST, __DB> FromSqlRow<__ST, __DB> for DateTime where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> FromSqlRow<__ST, __DB> for DateTime where
__DB: Backend,
Self: FromSql<__ST, __DB>,
See the trait documentation.
The number of fields that this type will consume. Must be equal to
the number of times you would call row.take()
in build_from_row
Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for DateTime
impl UnwindSafe for DateTime
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more