BackendExpectations class
What a particular backend is expected to support. The spec-fallback
FluentBackend sets everything false; CLDR backends declare exactly
what they render. Every flag here has a matching conformance check —
a backend's declaration IS tested, in both directions: a true flag
runs the positive rendering check, and (under
recordsUnsupportedOptionErrors) a false flag runs the degrade
check (still renders, records an error, never throws).
Constructors
- BackendExpectations({bool localeAwarePlurals = true, bool operandAwarePlurals = true, bool signDisplay = true, bool roundingMode = true, bool roundingIncrement = true, bool trailingZeroDisplay = true, bool numberingSystem = true, bool groupingStrategies = true, bool compactNotation = true, bool scientificNotation = false, bool accountingCurrencySign = false, bool hourCycle = true, bool calendar = true, bool timeZone = true, bool ecmaDefaultDigits = true, bool recordsUnsupportedOptionErrors = false})
-
Declares one backend's honest capability set; every flag
defaults to the capable side so a new check is opt-out.
const
Properties
- accountingCurrencySign → bool
-
ECMA-402
currencySign: accounting. Off by default — ICU4X ships no accounting patterns, so the icu backend degrades.final - calendar → bool
-
ECMA-402
calendaron DATETIME (buddhist, japanese, islamic, …).final - compactNotation → bool
-
ECMA-402
notation: compact(+compactDisplay).final - ecmaDefaultDigits → bool
-
ECMA-402 default digit resolution when NO digit options are given:
decimal caps at 3 fraction digits, percent at 0, currency renders
its per-currency minor units. Rendering must also agree with the
3-digit default the core's plural operands resolve with.
final
- groupingStrategies → bool
-
ECMA-402 v3
useGroupingstrategy strings (min2/always), on top of the boolean forms every backend handles.final - hashCode → int
-
The hash code for this object.
no setterinherited
- hourCycle → bool
-
ECMA-402
hourCycleon DATETIME (h11 / h12 / h23 / h24).final - localeAwarePlurals → bool
-
Whether the backend classifies numbers into real CLDR plural
categories (vs. always
other).final - numberingSystem → bool
-
ECMA-402
numberingSystemon NUMBER (e.g.arabdigits).final - operandAwarePlurals → bool
-
Whether plural selection honors visible fraction digits (CLDR operand
v) — the F8 case. A backend that classifies by the bare numeric value sets this false until it can consume a digit string.final - recordsUnsupportedOptionErrors → bool
-
Whether an option the backend does NOT support (a
falseflag above) still renders a usable string AND records aFluentError. The uniform-degrade contract; backends flip this on once their degrade paths are wired.final - roundingIncrement → bool
-
ECMA-402
roundingIncrement(nickel rounding etc.).final - roundingMode → bool
-
ECMA-402
roundingMode(the nine modes).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scientificNotation → bool
-
ECMA-402
notation: scientific/engineering. Off by default — ICU4X ships no exponent-symbol data, so the icu backend degrades.final - signDisplay → bool
-
ECMA-402
signDisplay(always / never / exceptZero / negative).final - timeZone → bool
-
ECMA-402
timeZoneon DATETIME (IANA zone ids).final - trailingZeroDisplay → bool
-
ECMA-402
trailingZeroDisplay: stripIfInteger.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited