Enum tidb_query_datatype::codec::mysql::Tz [−][src]
A time zone represented by either offset (i.e. +8) or name (i.e. Asia/Shanghai). In addition, local time zone is also valid.
Variants
Offset(FixedOffset)
A time zone specified by offset seconds.
Name(Tz)
A time zone specified by name (in IANA database).
Local(Local)
A local time zone.
Implementations
impl Tz
[src]
pub fn from_offset(secs: i64) -> Option<Self>
[src]
Constructs a time zone from the offset in seconds.
pub fn from_tz_name(name: &str) -> Option<Self>
[src]
Constructs a time zone from the name. If the specified time zone name is system
,
a local time zone will be constructed.
pub fn utc() -> Self
[src]
Constructs a UTC time zone.
pub fn local() -> Self
[src]
Constructs a local time zone.
Trait Implementations
impl Clone for Tz
[src]
impl Debug for Tz
[src]
impl Display for Tz
[src]
impl TimeZone for Tz
[src]
type Offset = TzOffset
An associated offset type.
This type is used to store the actual offset in date and time types.
The original TimeZone
value can be recovered via TimeZone::from_offset
. Read more
fn from_offset(offset: &Self::Offset) -> Self
[src]
fn offset_from_local_date(&self, local: &NaiveDate) -> LocalResult<Self::Offset>
[src]
fn offset_from_local_datetime(
&self,
local: &NaiveDateTime
) -> LocalResult<Self::Offset>
[src]
&self,
local: &NaiveDateTime
) -> LocalResult<Self::Offset>
fn offset_from_utc_date(&self, utc: &NaiveDate) -> Self::Offset
[src]
fn offset_from_utc_datetime(&self, utc: &NaiveDateTime) -> Self::Offset
[src]
fn from_local_date(&self, local: &NaiveDate) -> LocalResult<Date<Self>>
[src]
fn from_local_datetime(
&self,
local: &NaiveDateTime
) -> LocalResult<DateTime<Self>>
[src]
&self,
local: &NaiveDateTime
) -> LocalResult<DateTime<Self>>
fn from_utc_date(&self, utc: &NaiveDate) -> Date<Self>
[src]
fn from_utc_datetime(&self, utc: &NaiveDateTime) -> DateTime<Self>
[src]
pub fn ymd(&self, year: i32, month: u32, day: u32) -> Date<Self>
[src]
pub fn ymd_opt(
&self,
year: i32,
month: u32,
day: u32
) -> LocalResult<Date<Self>>
[src]
&self,
year: i32,
month: u32,
day: u32
) -> LocalResult<Date<Self>>
pub fn yo(&self, year: i32, ordinal: u32) -> Date<Self>
[src]
pub fn yo_opt(&self, year: i32, ordinal: u32) -> LocalResult<Date<Self>>
[src]
pub fn isoywd(&self, year: i32, week: u32, weekday: Weekday) -> Date<Self>
[src]
pub fn isoywd_opt(
&self,
year: i32,
week: u32,
weekday: Weekday
) -> LocalResult<Date<Self>>
[src]
&self,
year: i32,
week: u32,
weekday: Weekday
) -> LocalResult<Date<Self>>
pub fn timestamp(&self, secs: i64, nsecs: u32) -> DateTime<Self>
[src]
pub fn timestamp_opt(
&self,
secs: i64,
nsecs: u32
) -> LocalResult<DateTime<Self>>
[src]
&self,
secs: i64,
nsecs: u32
) -> LocalResult<DateTime<Self>>
pub fn timestamp_millis(&self, millis: i64) -> DateTime<Self>
[src]
pub fn timestamp_millis_opt(&self, millis: i64) -> LocalResult<DateTime<Self>>
[src]
pub fn timestamp_nanos(&self, nanos: i64) -> DateTime<Self>
[src]
pub fn datetime_from_str(
&self,
s: &str,
fmt: &str
) -> Result<DateTime<Self>, ParseError>
[src]
&self,
s: &str,
fmt: &str
) -> Result<DateTime<Self>, ParseError>
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(&mut EvalContext, W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,