Struct icu::timezone::ZoneVariant
source · [−]#[repr(transparent)]pub struct ZoneVariant(pub TinyAsciiStr<2_usize>);
Expand description
A time zone variant: currently either daylight time or standard time.
Tuple Fields
0: TinyAsciiStr<2_usize>
Implementations
sourceimpl ZoneVariant
impl ZoneVariant
sourcepub const fn standard() -> ZoneVariant
pub const fn standard() -> ZoneVariant
Return the standard time ZoneVariant
.
Corresponds to the "standard"
variant string in CLDR.
sourcepub const fn daylight() -> ZoneVariant
pub const fn daylight() -> ZoneVariant
Return the daylight time ZoneVariant
Corresponds to the "daylight"
variant string in CLDR.
Trait Implementations
sourceimpl AsULE for ZoneVariant
impl AsULE for ZoneVariant
type ULE = ZoneVariant
type ULE = ZoneVariant
The ULE type corresponding to Self
. Read more
sourcefn to_unaligned(self) -> <ZoneVariant as AsULE>::ULE
fn to_unaligned(self) -> <ZoneVariant as AsULE>::ULE
Converts from Self
to Self::ULE
. Read more
sourcefn from_unaligned(unaligned: <ZoneVariant as AsULE>::ULE) -> ZoneVariant
fn from_unaligned(unaligned: <ZoneVariant as AsULE>::ULE) -> ZoneVariant
Converts from Self::ULE
to Self
. Read more
sourceimpl Clone for ZoneVariant
impl Clone for ZoneVariant
sourcefn clone(&self) -> ZoneVariant
fn clone(&self) -> ZoneVariant
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ZoneVariant
impl Debug for ZoneVariant
sourceimpl<'de> Deserialize<'de> for ZoneVariant
impl<'de> Deserialize<'de> for ZoneVariant
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<ZoneVariant, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ZoneVariant, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<TinyAsciiStr<2_usize>> for ZoneVariant
impl From<TinyAsciiStr<2_usize>> for ZoneVariant
sourcefn from(other: TinyAsciiStr<2_usize>) -> ZoneVariant
fn from(other: TinyAsciiStr<2_usize>) -> ZoneVariant
Converts to this type from the input type.
sourceimpl FromStr for ZoneVariant
impl FromStr for ZoneVariant
type Err = <TinyAsciiStr<2_usize> as FromStr>::Err
type Err = <TinyAsciiStr<2_usize> as FromStr>::Err
The associated error which can be returned from parsing.
sourcefn from_str(input: &str) -> Result<ZoneVariant, <ZoneVariant as FromStr>::Err>
fn from_str(input: &str) -> Result<ZoneVariant, <ZoneVariant as FromStr>::Err>
Parses a string s
to return a value of this type. Read more
sourceimpl Hash for ZoneVariant
impl Hash for ZoneVariant
sourceimpl Ord for ZoneVariant
impl Ord for ZoneVariant
sourceimpl PartialEq<ZoneVariant> for ZoneVariant
impl PartialEq<ZoneVariant> for ZoneVariant
sourcefn eq(&self, other: &ZoneVariant) -> bool
fn eq(&self, other: &ZoneVariant) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ZoneVariant) -> bool
fn ne(&self, other: &ZoneVariant) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ZoneVariant> for ZoneVariant
impl PartialOrd<ZoneVariant> for ZoneVariant
sourcefn partial_cmp(&self, other: &ZoneVariant) -> Option<Ordering>
fn partial_cmp(&self, other: &ZoneVariant) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for ZoneVariant
impl Serialize for ZoneVariant
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl ULE for ZoneVariant
impl ULE for ZoneVariant
sourcefn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
Validates a byte slice, &[u8]
. Read more
sourcefn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
Parses a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime. Read more
sourceunsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Takes a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_byte_slice()
with
success. Read more
sourceimpl<'a> ZeroMapKV<'a> for ZoneVariant
impl<'a> ZeroMapKV<'a> for ZoneVariant
type Container = ZeroVec<'a, ZoneVariant>
type Container = ZeroVec<'a, ZoneVariant>
The container that can be used with this type: ZeroVec
or VarZeroVec
.
type Slice = ZeroSlice<ZoneVariant>
type GetType = ZoneVariant
type GetType = ZoneVariant
The type produced by Container::get()
Read more
type OwnedType = ZoneVariant
type OwnedType = ZoneVariant
The type produced by Container::replace()
and Container::remove()
,
also used during deserialization. If Self
is human readable serialized,
deserializing to Self::OwnedType
should produce the same value once
passed through Self::owned_as_self()
Read more
impl Copy for ZoneVariant
impl Eq for ZoneVariant
impl StructuralEq for ZoneVariant
impl StructuralPartialEq for ZoneVariant
Auto Trait Implementations
impl RefUnwindSafe for ZoneVariant
impl Send for ZoneVariant
impl Sync for ZoneVariant
impl Unpin for ZoneVariant
impl UnwindSafe for ZoneVariant
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more