swift-collections
swift-collections copied to clipboard
Sketch a `Loadable` protocol
Loadable enables safe loading of values from RawSpan and other byte streams. It depends on AutoLoadable, which represent Loadable types that have no invalid bit pattern.
This is an exploration of bit pattern validation, an idea originally presented as an alternative to a layout constraint the forums called AnyBitPattern. It turns out that the validation approach simply builds upon the layout constraint.