Skip to content

Commit

Permalink
docs(duration/formatter): add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kartva committed Jun 30, 2024
1 parent b5c3697 commit ae7c1b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/experimental/src/duration/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ impl DurationFormatter {
}
}

/// Validated options for [DurationFormatter](DurationFormatter).
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
pub struct ValidatedDurationFormatterOptions {
/// The style that will be applied to units
Expand Down Expand Up @@ -62,7 +63,7 @@ pub struct ValidatedDurationFormatterOptions {
nanosecond_visibility: FieldDisplay,

/// Number of fractional digits to use when formatting sub-second units (milliseconds, microseconds, nanoseconds).
/// # NOTE
/// # NOTE
/// - Only takes effect when the subsecond units are styled as `Numeric`.
/// - Zero means no fractional digits.
fractional_digits: FractionalDigits,
Expand Down Expand Up @@ -210,6 +211,7 @@ impl ValidatedDurationFormatterOptions {
}
}

/// An enum to specify the unit being used. Used with FieldStyle and FieldDisplay to indicate the field unit.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum Unit {
Year,
Expand Down

0 comments on commit ae7c1b0

Please sign in to comment.