pub struct Eras<'data> {
pub names: ZeroMap<'data, str, str>,
pub abbr: ZeroMap<'data, str, str>,
pub narrow: ZeroMap<'data, str, str>,
}
Expand description
String data for the name, abbrevation, and narrow form of a date’s era.
Keys of the map represent era codes, and the values are the display names.
Era codes are derived from CLDR data, and are calendar specific.
Some examples include: "be"
, "0"
/ "1"
, "bce"
/ "ce"
,
"heisei"
/ "meiji"
/ "reiwa"
/ … Not all era codes are inherited as-is,
such as for the extended Japanese calendar.
For more information on date time symbols, see FieldSymbol
.
Fields
names: ZeroMap<'data, str, str>
Symbol data for era names.
Keys are era codes, and values are display names. See Eras
.
abbr: ZeroMap<'data, str, str>
Symbol data for era abbreviations.
Keys are era codes, and values are display names. See Eras
.
narrow: ZeroMap<'data, str, str>
Symbol data for era narrow forms.
Keys are era codes, and values are display names. See Eras
.
Trait Implementations
sourceimpl<'data> Bake for Eras<'data>
impl<'data> Bake for Eras<'data>
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl<'de, 'data> Deserialize<'de> for Eras<'data> where
'de: 'data,
impl<'de, 'data> Deserialize<'de> for Eras<'data> where
'de: 'data,
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Eras<'data>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Eras<'data>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'data> Serialize for Eras<'data>
impl<'data> Serialize for Eras<'data>
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<'a> Yokeable<'a> for Eras<'static>
impl<'a> Yokeable<'a> for Eras<'static>
sourcefn transform(&'a self) -> &'a <Eras<'static> as Yokeable<'a>>::Output
fn transform(&'a self) -> &'a <Eras<'static> as Yokeable<'a>>::Output
This method must cast self
between &'a Self<'static>
and &'a Self<'a>
. Read more
sourcefn transform_owned(self) -> <Eras<'static> as Yokeable<'a>>::Output
fn transform_owned(self) -> <Eras<'static> as Yokeable<'a>>::Output
This method must cast self
between Self<'static>
and Self<'a>
. Read more
impl<'data> StructuralPartialEq for Eras<'data>
Auto Trait Implementations
impl<'data> RefUnwindSafe for Eras<'data>
impl<'data> Send for Eras<'data>
impl<'data> Sync for Eras<'data>
impl<'data> Unpin for Eras<'data>
impl<'data> UnwindSafe for Eras<'data>
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