pub struct Limits { /* private fields */ }Expand description
Resource limits for encoding.
Implementations§
Source§impl Limits
impl Limits
Sourcepub fn with_max_width(self, w: u64) -> Self
pub fn with_max_width(self, w: u64) -> Self
Set maximum image width.
Sourcepub fn with_max_height(self, h: u64) -> Self
pub fn with_max_height(self, h: u64) -> Self
Set maximum image height.
Sourcepub fn with_max_pixels(self, p: u64) -> Self
pub fn with_max_pixels(self, p: u64) -> Self
Set maximum total pixels (width × height).
Sourcepub fn with_max_memory_bytes(self, bytes: u64) -> Self
pub fn with_max_memory_bytes(self, bytes: u64) -> Self
Set maximum memory bytes the encoder may allocate.
Sourcepub fn max_height(&self) -> Option<u64>
pub fn max_height(&self) -> Option<u64>
Get maximum height, if set.
Sourcepub fn max_pixels(&self) -> Option<u64>
pub fn max_pixels(&self) -> Option<u64>
Get maximum pixels, if set.
Sourcepub fn max_memory_bytes(&self) -> Option<u64>
pub fn max_memory_bytes(&self) -> Option<u64>
Get maximum memory bytes, if set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
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