pub struct WebpEncoder { /* private fields */ }Expand description
WebP encoder.
Implementations§
Source§impl WebpEncoder
impl WebpEncoder
Sourcepub const fn with_quality(quality: EncoderQuality) -> Self
pub const fn with_quality(quality: EncoderQuality) -> Self
Create a WebP encoder with specified quality.
Trait Implementations§
Source§impl Debug for WebpEncoder
impl Debug for WebpEncoder
Source§impl Default for WebpEncoder
impl Default for WebpEncoder
Source§impl ImageEncoder for WebpEncoder
impl ImageEncoder for WebpEncoder
Source§fn encode<W: Write>(&self, _image: &Image, _writer: W) -> CodecResult<()>
fn encode<W: Write>(&self, _image: &Image, _writer: W) -> CodecResult<()>
Encode an image to a writer. Read more
Source§fn format(&self) -> ImageFormat
fn format(&self) -> ImageFormat
Get the format this encoder produces.
Source§fn encode_bytes(&self, image: &Image) -> CodecResult<Vec<u8>>
fn encode_bytes(&self, image: &Image) -> CodecResult<Vec<u8>>
Encode an image to bytes. Read more
Auto Trait Implementations§
impl Freeze for WebpEncoder
impl RefUnwindSafe for WebpEncoder
impl Send for WebpEncoder
impl Sync for WebpEncoder
impl Unpin for WebpEncoder
impl UnsafeUnpin for WebpEncoder
impl UnwindSafe for WebpEncoder
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> 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 more