pub struct WindowsParser {
data: DataPayload<TimezoneIdentifiersWindowsV1>,
}Expand description
A mapper between Windows time zone identifier and a BCP-47 ID.
This mapper currently only supports mapping from windows time zone identifiers to BCP-47 identifiers.
A windows time zone may vary depending on an associated territory/region. This is represented by the internal data mapping by delimiting the windows time zone and territory/region code with a “/”.
For instance, Central Standard Time can vary depending on the provided regions listed below:
- Central Standard Time/001
- Central Standard Time/US
- Central Standard Time/CA
- Central Standard Time/MX
- Central Standard Time/ZZ
As such, a Region may be provided to further specify a desired territory/region when
querying a BCP-47 identifier. If no region is provided or the specificity is not required,
then the territory will default to the M.49 World Code, 001.
Fields§
§data: DataPayload<TimezoneIdentifiersWindowsV1>Implementations§
Source§impl WindowsParser
impl WindowsParser
Sourcepub fn new() -> WindowsParserBorrowed<'static>
pub fn new() -> WindowsParserBorrowed<'static>
Creates a new static WindowsParserBorrowed.
Sourcepub fn try_new_unstable<P>(provider: &P) -> Result<Self, DataError>
pub fn try_new_unstable<P>(provider: &P) -> Result<Self, DataError>
A version of Self::new that uses custom data provided by a DataProvider.
Sourcepub fn as_borrowed(&self) -> WindowsParserBorrowed<'_>
pub fn as_borrowed(&self) -> WindowsParserBorrowed<'_>
Returns the borrowed version of the mapper that can be queried from the owned mapper.
Using the borrowed version allows one to avoid a small potential indirection cost when querying the mapper from the owned version.