pub struct AnimHeader {
pub background_color: BackgroundColor,
pub loop_count: u16,
}Expand description
Decoded §2.7.1.1 ANIM chunk — global animation parameters.
Constructed via AnimHeader::parse.
Fields§
§background_color: BackgroundColorBackground Color field, broken into BGRA components.
loop_count: u16Loop Count field. 0 means “loop infinitely” per §2.7.1.1.
Implementations§
Source§impl AnimHeader
impl AnimHeader
Sourcepub fn parse(payload: &[u8]) -> Result<Self, AnimError>
pub fn parse(payload: &[u8]) -> Result<Self, AnimError>
Parse the 6-byte ANIM chunk payload per RFC 9649 §2.7.1.1.
payload is the slice returned by
crate::container::WebpChunk::payload for a chunk whose
FourCC is crate::container::fourcc::ANIM.
Sourcepub const fn loops_forever(&self) -> bool
pub const fn loops_forever(&self) -> bool
true when Loop Count == 0, which §2.7.1.1 defines as
“infinite playback”.
Trait Implementations§
Source§impl Clone for AnimHeader
impl Clone for AnimHeader
Source§fn clone(&self) -> AnimHeader
fn clone(&self) -> AnimHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AnimHeader
Source§impl Debug for AnimHeader
impl Debug for AnimHeader
impl Eq for AnimHeader
Source§impl PartialEq for AnimHeader
impl PartialEq for AnimHeader
Source§fn eq(&self, other: &AnimHeader) -> bool
fn eq(&self, other: &AnimHeader) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AnimHeader
Auto Trait Implementations§
impl Freeze for AnimHeader
impl RefUnwindSafe for AnimHeader
impl Send for AnimHeader
impl Sync for AnimHeader
impl Unpin for AnimHeader
impl UnsafeUnpin for AnimHeader
impl UnwindSafe for AnimHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more