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
impl StructuralPartialEq for Block
Auto Trait Implementations
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
Blanket Implementations
impl<T> Any for Block
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Block
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Block
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Block
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Block
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Block
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Block
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Block
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Block
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>