pub fn validate( encoding: &Encoding, limits: &Limits, ) -> Result<SceneCost, WireError>
Check encoding and return what it costs. limits bounds the cost.
encoding
limits
The first invariant the encoding breaks.