pub struct Conversion {
pub binary: Policy,
}Expand description
Everything that shapes a value on its way out.
There is deliberately no Default, for the reason given on
super::binary::Policy: every field is a published setting, and a default
written here would be a second copy of a number the registry already
carries. A value of this type can only be built from the registry, which is
a stronger guarantee than a test checking that nobody bypassed it.
Fields§
§binary: PolicyHow byte values are handled.
Implementations§
Source§impl Conversion
impl Conversion
Sourcepub const fn stable() -> Self
pub const fn stable() -> Self
The shaping for the places a display setting must not reach.
Two kinds of reading use this, for the same reason and not for convenience.
The catalogue readings and the server’s own status readings select
names, numbers and short texts out of information_schema and the
server’s status tables. No column there carries raw bytes, so
output.binary has nothing to apply to. Two families do carry it —
binary and geometry — and
that claim is about data rather than about code, so it is checked by
the_stable_shaping_differs_from_the_published_one_only_for_raw_bytes
here and by an acceptance proof against a real server. If either goes
red the answer is to thread the registry shaping through that path.
The signature over an exported copy is the other. It has to be reproducible for the same rows, so a checksum that moved when somebody changed how they like byte values displayed would be a defect and not a feature.
This is a statement that those settings do not reach here, and not a default standing in for them. The two are easy to confuse and the difference matters: a default would be a second copy of a published number, which is how a setting comes to have no effect. The numbers here are deliberately not the published ones.