ExactInterval

ExactInterval :: # (opaque)

Exact appointments, native profile exact-offset-interval-v1. Both endpoints are complete OffsetTimestamp declarations, separated by one slash. The start is inclusive and the end exclusive, with start strictly before end after resolving each supplied offset. Canonical text retains endpoint declarations, including fractional width and asserted versus unasserted offsets.

RFC 3339 does not specify interval syntax: this composition is a native contract, not an ISO/EDTF conformance claim. Bare dates, durations, abbreviated or missing endpoints and annotations are unsupported by this exact profile. Date-only EDTF endpoints mean something different and are never inferred here.

Parsing checks 513 UTF-8 bytes before copying (two 256-byte timestamp limits plus a separator). All construction, conversion and output work is bounded. Span projection discards source presentation explicitly; declaration equality retains it. No uncertain-endpoint interpretation, source fidelity or versioned persistence claim is made. See OffsetTimestamp for its RFC source contracts.

parser_for : encoding -> (state -> Try({ value : ExactInterval, rest : state }, [InvalidExactInterval(Error), Encoding(err), ..]))
    where [
        encoding.parse_str : encoding, state -> Try({ value : Str, rest : state }, err),
    ]

Generic encodings carry canonical text, never the opaque backing record. Encoding failures remain distinct from this profile's validation errors. The encoding owns framing and its work limits; parse bounds the decoded text.

encoder_for : encoding -> (ExactInterval, state -> Try(state, err))
    where [
        encoding.encode_str : Str, state -> Try(state, err),
    ]
from_quote : Str -> Try(ExactInterval, [BadQuotedBytes(Str)])

Typed quoted literals use the same checked profile at compile time. Runtime interpolation remains Str followed by an explicit parse call.

new : OffsetTimestamp, OffsetTimestamp -> Try(ExactInterval, Error)
endpoints : ExactInterval -> { start : OffsetTimestamp, end : OffsetTimestamp }
span : ExactInterval -> PosixSpan
from_span : PosixSpan, Offset, U8 -> Try(ExactInterval, Error)

Explicit offset and exact fractional width for computed coverage output. Precision loss fails; output never silently rounds a boundary.

is_eq : ExactInterval, ExactInterval -> Bool
fact_count : ExactInterval -> U64

Stored extent plus original endpoint declarations, without re-resolution.

fact_at : ExactInterval, U64 -> [End, Item(SemanticFact)]
Error : [Malformed, Incomplete, TooLarge, Start(Error), End(Error), EmptySpan, ReversedBounds]