Struct
TimeZone
pub struct TimeZone {
pub name: String,
pub data: Vec<u8>,
}Expand description
The user’s preferred timezone.
Fields
name: Stringdata: Vec<u8>Implementations
impl TimeZone
impl TimeZone
pub fn now(&self) -> Zoned
pub fn timezone(&self) -> TimeZone
pub fn name(&self) -> &str
pub fn abbreviation(&self, timestamp: Timestamp) -> String
Trait Implementations
impl Archive for TimeZonewhere
String: Archive,
Vec<u8>: Archive,
impl Archive for TimeZonewhere
String: Archive,
Vec<u8>: Archive,
const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
An optimization flag that allows the bytes of this type to be copied
directly to a writer instead of calling
serialize. Read moretype Resolver = TimeZoneResolver
type Resolver = TimeZoneResolver
The resolver for this type. It must contain all the additional
information from serializing needed to make the archived type from
the normal type.
impl Clone for TimeZone
impl Clone for TimeZone
1.0.0fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Debug for TimeZone
impl Debug for TimeZone
impl<'de> Deserialize<'de> for TimeZone
impl<'de> Deserialize<'de> for TimeZone
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<__D: Fallible + ?Sized> Deserialize<TimeZone, __D> for Archived<TimeZone>where
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Vec<u8>: Archive,
<Vec<u8> as Archive>::Archived: Deserialize<Vec<u8>, __D>,
impl<__D: Fallible + ?Sized> Deserialize<TimeZone, __D> for Archived<TimeZone>where
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Vec<u8>: Archive,
<Vec<u8> as Archive>::Archived: Deserialize<Vec<u8>, __D>,
fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<TimeZone, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<TimeZone, <__D as Fallible>::Error>
Deserializes using the given deserializer
impl Hash for TimeZone
impl Hash for TimeZone
1.3.0fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Self: Sized,
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Self: Sized,
Feeds a slice of this type into the given [
Hasher]. Read moreimpl PartialEq for TimeZone
impl PartialEq for TimeZone
impl<__S: Fallible + ?Sized> Serialize<__S> for TimeZonewhere
String: Serialize<__S>,
Vec<u8>: Serialize<__S>,
impl<__S: Fallible + ?Sized> Serialize<__S> for TimeZonewhere
String: Serialize<__S>,
Vec<u8>: Serialize<__S>,
fn serialize(
&self,
serializer: &mut __S,
) -> Result<<Self as Archive>::Resolver, <__S as Fallible>::Error>
fn serialize( &self, serializer: &mut __S, ) -> Result<<Self as Archive>::Resolver, <__S as Fallible>::Error>
Writes the dependencies for the object and returns a resolver that can
create the archived type.
impl Serialize for TimeZone
impl Serialize for TimeZone
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more