#[non_exhaustive]pub struct ParsePixelFormatError;Expand description
The error PixelFormat’s FromStr returns at the
no-alloc tier.
Since 0.5.0 this is no longer FromStr::Err at the alloc / std
tier. There the vocabulary is open and the parse is total, so the
associated type is Infallible and the
signature says what the behaviour always was. The type itself is
unchanged and still exported: the lean build returns it, and code that
names it keeps compiling.
Opaque and sealed: the input is deliberately not retained (this type is
reachable only at the no-alloc tier, where there is nowhere to put an
owned copy, and the input is attacker-controlled on the deserialization
path). #[non_exhaustive] keeps it constructible only here, so it can
grow structure later without breaking callers.
Trait Implementations§
Source§impl Clone for ParsePixelFormatError
impl Clone for ParsePixelFormatError
Source§fn clone(&self) -> ParsePixelFormatError
fn clone(&self) -> ParsePixelFormatError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ParsePixelFormatError
Source§impl Debug for ParsePixelFormatError
impl Debug for ParsePixelFormatError
Source§impl Display for ParsePixelFormatError
impl Display for ParsePixelFormatError
impl Eq for ParsePixelFormatError
Source§impl Error for ParsePixelFormatError
impl Error for ParsePixelFormatError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()