pub struct EncoderBuilder { /* private fields */ }Expand description
Builder for PNG encoder configuration.
Implementations§
Source§impl EncoderBuilder
impl EncoderBuilder
Sourcepub const fn compression_level(self, level: CompressionLevel) -> Self
pub const fn compression_level(self, level: CompressionLevel) -> Self
Set compression level.
Sourcepub const fn filter_strategy(self, strategy: FilterStrategy) -> Self
pub const fn filter_strategy(self, strategy: FilterStrategy) -> Self
Set filter strategy.
Sourcepub const fn optimize_palette(self, enable: bool) -> Self
pub const fn optimize_palette(self, enable: bool) -> Self
Enable palette optimization.
Sourcepub fn build(self) -> PngEncoder
pub fn build(self) -> PngEncoder
Build the encoder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EncoderBuilder
impl RefUnwindSafe for EncoderBuilder
impl Send for EncoderBuilder
impl Sync for EncoderBuilder
impl Unpin for EncoderBuilder
impl UnsafeUnpin for EncoderBuilder
impl UnwindSafe for EncoderBuilder
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