pub enum Timezone {
Offset(FixedOffset),
Named(Tz),
}
Variants§
Offset(FixedOffset)
Named(Tz)
Implementations§
source§impl Timezone
impl Timezone
sourcepub fn hours_mins_opt(offset_hours: i32, offset_mins: u32) -> Result<Self>
pub fn hours_mins_opt(offset_hours: i32, offset_mins: u32) -> Result<Self>
Compute timezone from given offset hours and minutes
Return Err
if given offset exceeds scope
sourcepub fn from_tz_string(tz_string: &str) -> Result<Self>
pub fn from_tz_string(tz_string: &str) -> Result<Self>
Parse timezone offset string and return None if given offset exceeds scope.
String examples are available as described in https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html
SYSTEM
- Offset to UTC:
+08:00
,-11:30
- Named zones:
Asia/Shanghai
,Europe/Berlin
sourcepub fn local_minus_utc(&self) -> i64
pub fn local_minus_utc(&self) -> i64
Returns the number of seconds to add to convert from UTC to the local time.
Trait Implementations§
impl Eq for Timezone
impl StructuralPartialEq for Timezone
Auto Trait Implementations§
impl Freeze for Timezone
impl RefUnwindSafe for Timezone
impl Send for Timezone
impl Sync for Timezone
impl Unpin for Timezone
impl UnwindSafe for Timezone
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request