Skip to content

Commit

Permalink
Add more links to the fieldsets module (#5860)
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc authored Nov 23, 2024
1 parent 5cd4091 commit da2c1b3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/datetime/src/combo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::{provider::neo::*, scaffold::*};
/// Struct for combining date/time fields with zone fields.
///
/// This struct produces "composite field sets" as defined in UTS 35.
/// See [`fieldsets`](crate::fieldsets).
///
/// # Examples
///
Expand Down
16 changes: 15 additions & 1 deletion components/datetime/src/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

//! Enumerations over field sets.
//! Enumerations over [field sets](crate::fieldsets).
//!
//! These enumerations can be used when the field set is not known at compile time. However,
//! they may contribute negatively to the binary size of the formatters.
Expand Down Expand Up @@ -62,6 +62,8 @@ use crate::{fields, fieldsets, Length};
use icu_provider::prelude::*;

/// An enumeration over all possible date field sets.
///
/// This is a dynamic field set. For more information, see [`enums`](crate::fieldsets::enums).
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum DateFieldSet {
Expand Down Expand Up @@ -89,6 +91,8 @@ pub enum DateFieldSet {
}

/// An enumeration over all possible calendar period field sets.
///
/// This is a dynamic field set. For more information, see [`enums`](crate::fieldsets::enums).
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum CalendarPeriodFieldSet {
Expand All @@ -109,6 +113,8 @@ pub enum CalendarPeriodFieldSet {
}

/// An enumeration over all possible time field sets.
///
/// This is a dynamic field set. For more information, see [`enums`](crate::fieldsets::enums).
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum TimeFieldSet {
Expand All @@ -118,6 +124,8 @@ pub enum TimeFieldSet {

/// An enumeration over all possible zone field sets.
///
/// This is a dynamic field set. For more information, see [`enums`](crate::fieldsets::enums).
///
/// Note: [`fieldsets::Zs`] and [`fieldsets::Vs`] are not included in this enum
/// because they are data size optimizations only.
///
Expand Down Expand Up @@ -167,6 +175,8 @@ pub enum ZoneStyle {
}

/// An enumeration over all possible date+time composite field sets.
///
/// This is a dynamic field set. For more information, see [`enums`](crate::fieldsets::enums).
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum DateAndTimeFieldSet {
Expand Down Expand Up @@ -200,6 +210,8 @@ pub enum DateAndTimeFieldSet {
///
/// This enum is useful when formatting a type that does not contain a
/// time zone or to avoid storing time zone data.
///
/// This is a dynamic field set. For more information, see [`enums`](crate::fieldsets::enums).
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum CompositeDateTimeFieldSet {
Expand Down Expand Up @@ -248,6 +260,8 @@ impl GetField<CompositeFieldSet> for CompositeDateTimeFieldSet {
}

/// An enum supporting all possible field sets and options.
///
/// This is a dynamic field set. For more information, see [`enums`](crate::fieldsets::enums).
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum CompositeFieldSet {
Expand Down
2 changes: 2 additions & 0 deletions components/datetime/src/fieldsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ macro_rules! impl_date_or_calendar_period_marker {
impl_marker_with_options!(
#[doc = concat!("**“", $sample, "**” ⇒ ", $description)]
///
/// This is a field set marker. For more information, see [`fieldsets`](crate::fieldsets).
///
/// # Examples
///
/// In [`DateTimeFormatter`](crate::neo::DateTimeFormatter):
Expand Down

0 comments on commit da2c1b3

Please sign in to comment.