pub struct DateTimeBuilder { /* private fields */ }Expand description
An intermediate builder for DateTime.
Implementations§
Source§impl DateTimeBuilder
impl DateTimeBuilder
Sourcepub const fn hms(self, hour: u8, minute: u8, second: u8) -> Self
pub const fn hms(self, hour: u8, minute: u8, second: u8) -> Self
Attach an hour, minute, and second to the datetime.
Sourcepub const fn tz(self, tz: TimeZoneRef<'static>) -> TzResult<Self>
Available on crate feature tz only.
pub const fn tz(self, tz: TimeZoneRef<'static>) -> TzResult<Self>
tz only.Attach a timezone to the datetime.
This method assumes that the timezone modifies the underlying timestamp; in other words, the YMD/HMS specified to the date and time builder should be preserved, and the time zone’s offset applied to the underlying timestamp to preserve the date and time on the wall clock.
Auto Trait Implementations§
impl Freeze for DateTimeBuilder
impl RefUnwindSafe for DateTimeBuilder
impl Send for DateTimeBuilder
impl Sync for DateTimeBuilder
impl Unpin for DateTimeBuilder
impl UnsafeUnpin for DateTimeBuilder
impl UnwindSafe for DateTimeBuilder
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read more