impl TimeZoneFormatter { /// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "specific_long")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::SpecificLong, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[diplomat::demo(default_constructor)] #[cfg(feature = "compiled_data")] pubfn create_specific_long(
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let zone = icu_datetime::fieldsets::zone::SpecificLong; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new(
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "specific_long_with_provider")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::SpecificLong, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "buffer_provider")] pubfn create_specific_long_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let provider = provider.get()?; let zone = icu_datetime::fieldsets::zone::SpecificLong; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new_with_buffer_provider(
provider,
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "specific_short")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::SpecificShort, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "compiled_data")] pubfn create_specific_short(
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let zone = icu_datetime::fieldsets::zone::SpecificShort; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new(
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "specific_short_with_provider")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::SpecificShort, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "buffer_provider")] pubfn create_specific_short_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let provider = provider.get()?; let zone = icu_datetime::fieldsets::zone::SpecificShort; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new_with_buffer_provider(
provider,
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "localized_offset_long")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::LocalizedOffsetLong, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "compiled_data")] pubfn create_localized_offset_long(
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let zone = icu_datetime::fieldsets::zone::LocalizedOffsetLong; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new(
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "localized_offset_long_with_provider")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::LocalizedOffsetLong, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "buffer_provider")] pubfn create_localized_offset_long_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let provider = provider.get()?; let zone = icu_datetime::fieldsets::zone::LocalizedOffsetLong; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new_with_buffer_provider(
provider,
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "localized_offset_short")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::LocalizedOffsetShort, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "compiled_data")] pubfn create_localized_offset_short(
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let zone = icu_datetime::fieldsets::zone::LocalizedOffsetShort; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new(
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "localized_offset_short_with_provider")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::LocalizedOffsetShort, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "buffer_provider")] pubfn create_localized_offset_short_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let provider = provider.get()?; let zone = icu_datetime::fieldsets::zone::LocalizedOffsetShort; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new_with_buffer_provider(
provider,
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "generic_long")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::GenericLong, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "compiled_data")] pubfn create_generic_long(
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let zone = icu_datetime::fieldsets::zone::GenericLong; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new(
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "generic_long_with_provider")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::GenericLong, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "buffer_provider")] pubfn create_generic_long_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let provider = provider.get()?; let zone = icu_datetime::fieldsets::zone::GenericLong; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new_with_buffer_provider(
provider,
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "generic_short")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::GenericShort, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "compiled_data")] pubfn create_generic_short(
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let zone = icu_datetime::fieldsets::zone::GenericShort; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new(
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "generic_short_with_provider")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::GenericShort, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "buffer_provider")] pubfn create_generic_short_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let provider = provider.get()?; let zone = icu_datetime::fieldsets::zone::GenericShort; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new_with_buffer_provider(
provider,
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "location")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::Location, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "compiled_data")] pubfn create_location(
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let zone = icu_datetime::fieldsets::zone::Location; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new(
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "location_with_provider")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::Location, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "buffer_provider")] pubfn create_location_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let provider = provider.get()?; let zone = icu_datetime::fieldsets::zone::Location; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new_with_buffer_provider(
provider,
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "exemplar_city")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::ExemplarCity, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "compiled_data")] pubfn create_exemplar_city(
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let zone = icu_datetime::fieldsets::zone::ExemplarCity; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new(
prefs,
options
)?
.cast_into_fset(),
)))
}
/// Creates a zoned formatter based on a non-zoned formatter. /// /// Caution: The locale provided here must match the locale used to construct the non-zoned formatter, /// or else unexpected behavior may occur! #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "exemplar_city_with_provider")] #[diplomat::rust_link(icu::datetime::fieldsets::zone::ExemplarCity, Struct)] #[diplomat::rust_link(icu::datetime::fieldsets::Combo, Struct, hidden)] #[cfg(feature = "buffer_provider")] pubfn create_exemplar_city_with_provider(
provider: &DataProvider,
locale: &Locale,
) -> Result<Box<Self>, DateTimeFormatterLoadError> { let provider = provider.get()?; let zone = icu_datetime::fieldsets::zone::ExemplarCity; let prefs = (&locale.0).into(); let options = zone;
Ok(Box::new(Self(
icu_datetime
::FixedCalendarDateTimeFormatter
::try_new_with_buffer_provider(
provider,
prefs,
options
)?
.cast_into_fset(),
)))
}
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.