Expand description
Each value is parsed once at the boundary: deserializing input and decoding a row share it.
Re-exports§
pub use fixture::Fixture;pub use fixture::InputFixture;pub use fixture::Samples;pub use fixture::Seed;
Modules§
- fixture
- The same seed gives the same values, so a failing test fails again.
Structs§
- Coordinate
- Whole ten-millionths of a degree, so two equal points compare equal.
- Currency
- Date
Debugmasks it so it stays out of logs.- Form
Field - Input
- Instant
- Stored and written in UTC whatever offset it was read with.
- Local
Date Time - The instant is worked out when needed, so the time survives a change to the zone’s rules.
- Locale
- Each part is checked for its shape, not against a registry.
- Measurement
- Equality compares the unit too: convert before comparing across units.
- Money
- Part
- A part with options is a select.
- Percentage
- Basis points, so it is exact; may be negative or above 100 %. A JSON number is basis points,
text is a percent as a person types it:
"19.5"is 1950. - Person
Name - One field: names do not split into given and family the same way everywhere.
- Phone
Number - Personal data:
Debugmasks it. - Secret
- No
Displayand noSerialize, so no reply, log field or event payload can carry it. - Slug
- Time
OfDay - To the minute, as a time input posts it; stored as
HH:MMtext, which sorts as it reads. - Time
Zone - Stored by name, so a time kept in it follows the zone’s rules as they change.
- Url
Enums§
- Constraint
- A bound counts characters for text and compares numbers; the derive picks by
Measured::TEXT. - Control
- Energy
Unit - Length
Unit - LogValue
- Operator
- Search
- How full-text search treats a value: words of
Textare matched, anExactvalue only whole,NumberandTimeby range, and aSkippedone never indexed. - Weekday
- Stored and sent by its name, as an enum’s variant is; its labels are the
weekdayenum’s. - Weight
Unit - Steps of a nanogram: an ounce is not a whole microgram.
Constants§
- EXACT
- Codes, flags and sensitive values, whose parts must not be probed.
- LATIN_
COMBINING_ ACCENTS - Decomposed accents, which a slug drops as it spells Latin letters in ASCII.
- ORDERED
- TEXT
Traits§
- Conventions
- Filter
- Form
Fields - LogFields
- Present
- Sensitive
Fields - Written by
#[derive(Aggregate)]for#[sensitive]fields, which log only***. - Surfaces
From Inner - A marker the derive implements; a value overriding a surface implements that trait instead.
- Unit
- Each unit is a whole number of the quantity’s smallest step: conversion is integer arithmetic.
Functions§
- is_
slug_ character - A letter, digit or nonspacing or spacing mark (L*, N*, Mn, Mc) that lowercasing leaves as it is; anything else parts a slug’s words, unassigned, private-use and format characters too.
- percent_
text - Basis points as the percent a
Percentagecontrol holds,12.50for 1250.