Skip to main content

Note

Enum Note 

Source
pub enum Note {
Show 24 variants AlreadyValidEdtf, CenturyPartInterval, ModifierDropped, CenturyMask, BcCenturyInterval, AstronomicalYear, ElidedEndYear, NumericUnambiguous, NumericResolvedByOption, NumericResolvedByLocale, NumericOrderIrrelevant, NumericOrderAmbiguous, DecadeAmbiguity, DefaultCenturyApplied, SeasonCode, OpenInterval, MissingYearMasked, QualifierDistributed, OrAlternatives, SeasonRangeCollision, RomanCentury, DecadeOfCentury, EndpointYearDistributed, CrossYearSeason,
}
Expand description

Why an output looks the way it does. Each variant cites the N-decision in docs/normalize-notes.md that governs it, so a form can explain the conversion to the person typing.

Variants§

§

AlreadyValidEdtf

The input was already valid EDTF; only canonicalized.

§

CenturyPartInterval

early/mid/late or half-of-century mapped to a decade-rounded interval (N1).

§

ModifierDropped

An early/mid/late modifier was dropped as false precision and recorded (N1).

§

CenturyMask

“19th century” → 18XX: centuries run 1801–1900 (N2).

§

BcCenturyInterval

BC centuries have no digit mask (negative years cannot carry X); emitted as exact intervals like -0199/-0100 (N2).

§

AstronomicalYear

BC year converted to astronomical numbering: year 0 exists, so 500 BC → -0499 (N3).

§

ElidedEndYear

“1914-18”: the end year inherits the start’s century (N4).

§

NumericUnambiguous

Numeric date order was provable from the input: a year-first layout, or a field whose value exceeds 12 (N5).

§

NumericResolvedByOption

Numeric date order resolved by Options::numeric_order (N5).

§

NumericResolvedByLocale

Numeric date order implied by the language’s convention (N5).

§

NumericOrderIrrelevant

Day and month were equal, so the order cannot matter (N5).

§

NumericOrderAmbiguous

Both numeric readings are plausible; each is reported (N5).

§

DecadeAmbiguity

A decade form with more than one reading (“1900s”, “the 80s”) (N6).

§

DefaultCenturyApplied

Bare decade resolved by Options::default_century (N6).

§

SeasonCode

Season name mapped to an ISO 8601-2 sub-year grouping code (N7).

§

OpenInterval

before/after rendered as an open interval ../X or X/.. (N8).

§

MissingYearMasked

A date with no year: the year is masked as XXXX (N9).

§

QualifierDistributed

A whole-expression qualifier was distributed over interval endpoints (N10).

§

OrAlternatives

“X or Y”: each alternative reported instead of picking one (N14).

§

SeasonRangeCollision

NNNN-NN collides between an EDTF sub-year code and an elided year range; both readings reported (N13).

§

RomanCentury

Century read from a Roman numeral, Cyrillic lookalike letters tolerated (“XIX век”, “ХІХ век”) (N15).

§

DecadeOfCentury

A bare decade tied to an explicit century (“60-е годы XIX века” → 186X) (N6).

§

EndpointYearDistributed

A range endpoint without a year inherited the other endpoint’s stated year (“June-July 1940” → 1940-06/1940-07) (N16).

§

CrossYearSeason

“winter 1941-42” may be one boundary-spanning winter or a season-to-year range; both readings reported (N17).

Implementations§

Source§

impl Note

Source

pub const fn decision(self) -> Option<&'static str>

The N-decision in docs/normalize-notes.md this note cites, if any.

Source

pub const fn message(self) -> &'static str

A short human-readable explanation of the note.

Trait Implementations§

Source§

impl Clone for Note

Source§

fn clone(&self) -> Note

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Note

Source§

impl Debug for Note

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Note

Source§

impl PartialEq for Note

Source§

fn eq(&self, other: &Note) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Note

Auto Trait Implementations§

§

impl Freeze for Note

§

impl RefUnwindSafe for Note

§

impl Send for Note

§

impl Sync for Note

§

impl Unpin for Note

§

impl UnsafeUnpin for Note

§

impl UnwindSafe for Note

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.