/// A mapper between Windows time zone identifiers and BCP-47 time zone identifiers. /// /// This mapper supports two-way mapping, but it is optimized for the case of Windows to BCP-47. /// It also supports normalizing and canonicalizing the Windows strings. #[diplomat::opaque] #[diplomat::rust_link(icu::time::zone::windows::WindowsParser, Struct)] #[diplomat::rust_link(icu::time::zone::windows::WindowsParserBorrowed, Struct, hidden)] #[diplomat::rust_link(
icu::time::zone::windows::WindowsParserBorrowed::new,
FnInStruct,
hidden
)] pubstruct WindowsParser(pub icu_time::zone::windows::WindowsParser);
impl WindowsParser { /// Create a new [`WindowsParser`] using compiled data #[diplomat::rust_link(icu::time::zone::windows::WindowsParser::new, FnInStruct)] #[diplomat::attr(auto, constructor)] #[cfg(feature = "compiled_data")] pubfn create() -> Box<WindowsParser> { Box::new(WindowsParser(
icu_time::zone::windows::WindowsParser::new().static_to_owned(),
))
}
/// Create a new [`WindowsParser`] using a particular data source #[diplomat::rust_link(icu::time::zone::windows::WindowsParser::new, FnInStruct)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "with_provider")] #[cfg(feature = "buffer_provider")] pubfn create_with_provider(
provider: &DataProvider,
) -> Result<Box<WindowsParser>, DataError> {
Ok(Box::new(WindowsParser(
icu_time::zone::windows::WindowsParser::try_new_with_buffer_provider(
provider.get()?,
)?,
)))
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.