pub struct GifConfig {
pub fps: u8,
pub width: u32,
pub height: u32,
pub quality: u8,
pub loop_count: u16,
}Expand description
Configuration for GIF recording
Fields§
§fps: u8Frames per second (10-30 typical)
width: u32Output width in pixels
height: u32Output height in pixels
quality: u8Quality level (1-100, affects palette quantization)
loop_count: u16Loop count (0 = infinite)
Implementations§
Source§impl GifConfig
impl GifConfig
Sourcepub fn with_quality(self, quality: u8) -> Self
pub fn with_quality(self, quality: u8) -> Self
Set quality (1-100)
Sourcepub fn with_loop_count(self, count: u16) -> Self
pub fn with_loop_count(self, count: u16) -> Self
Set loop count (0 = infinite)
Sourcepub fn frame_delay_cs(&self) -> u16
pub fn frame_delay_cs(&self) -> u16
Calculate frame delay in centiseconds (GIF standard)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GifConfig
impl<'de> Deserialize<'de> for GifConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GifConfig
impl RefUnwindSafe for GifConfig
impl Send for GifConfig
impl Sync for GifConfig
impl Unpin for GifConfig
impl UnsafeUnpin for GifConfig
impl UnwindSafe for GifConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().