pub struct InvalidDimensions { /* private fields */ }Expand description
Payload for ConvertError::InvalidDimensions.
A picture frame declaring a negative width or height.
The sibling of InvalidSampleCount on the picture road, and found
by auditing for it: width and height were floored with .max(0)
before anything judged them, so a declared -1 became 0 and then
sailed through the pixel ceiling (zero pixels is under every
ceiling) to produce a real VideoFrame of zero extent. A refusal
delivered as a successful decode, which is the one outcome worse
than an error.
Zero itself is not refused here: it is what an unset dimension reads as, the ceilings and the plane geometry both handle it, and inventing a refusal for it would be policy this audit has no evidence for. Only the negative — which cannot be a dimension under any reading — is named.
Implementations§
Trait Implementations§
Source§impl Clone for InvalidDimensions
impl Clone for InvalidDimensions
Source§fn clone(&self) -> InvalidDimensions
fn clone(&self) -> InvalidDimensions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more