Enum Block
#[repr(u8)]
pub enum Block
Known GIF block labels.
Note that the block uniquely specifies the layout of bytes that follow and how they are framed. For example, the header always has a fixed length but is followed by a variable amount of additional data. An image descriptor may be followed by a local color table depending on information read in it. Therefore, it doesn't make sense to continue parsing after encountering an unknown block as the semantics of following bytes are unclear.
The extension block provides a common framing for an arbitrary amount of application specific data which may be ignored.
Variants
-
Image = 0x2C Image block.
-
Extension = 0x21 Extension block.
-
Trailer = 0x3B Image trailer.
Implementations
impl Block
const fn from_u8(n: u8) -> Option<Self>Converts
u8toOption<Self>
Trait Implementations
impl Clone for Block
fn clone(&self) -> Self
impl Copy for Block
impl Debug for Block
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Block
impl PartialEq for Block
fn eq(&self, other: &Self) -> bool