pub struct ParallelBuilder { /* private fields */ }Expand description
Custom configuration for building a Parallel.
This struct is not meant to be used directly.
Use Parallel::from_vec instead.
Implementations§
Source§impl ParallelBuilder
impl ParallelBuilder
Sourcepub fn with_quality(self, quality: u8) -> ParallelBuilder
pub fn with_quality(self, quality: u8) -> ParallelBuilder
Specifies the quality of compressed images. Defaults to 95 (95% of the original quality).
This method is optional.
Sourcepub fn with_device(self, device_num: u8) -> ParallelBuilder
pub fn with_device(self, device_num: u8) -> ParallelBuilder
Specifies the number of threads to be used. Defaults to 2.
This method is optional.
§Warning
Theoretically, using more threads would mean more workers working on your images. However, spawning many threads has diminishing returns and not to mention it can be costly. Experiment as you please, but if you don’t know what number to put in simply don’t use this method as it is optional.
Trait Implementations§
Source§impl Clone for ParallelBuilder
impl Clone for ParallelBuilder
Source§fn clone(&self) -> ParallelBuilder
fn clone(&self) -> ParallelBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParallelBuilder
impl Debug for ParallelBuilder
Source§impl Default for ParallelBuilder
impl Default for ParallelBuilder
Source§fn default() -> ParallelBuilder
fn default() -> ParallelBuilder
Returns the “default value” for a type. Read more
Source§impl Display for ParallelBuilder
impl Display for ParallelBuilder
Source§impl Hash for ParallelBuilder
impl Hash for ParallelBuilder
Source§impl Ord for ParallelBuilder
impl Ord for ParallelBuilder
Source§fn cmp(&self, other: &ParallelBuilder) -> Ordering
fn cmp(&self, other: &ParallelBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ParallelBuilder
impl PartialEq for ParallelBuilder
Source§impl PartialOrd for ParallelBuilder
impl PartialOrd for ParallelBuilder
impl Eq for ParallelBuilder
impl StructuralPartialEq for ParallelBuilder
Auto Trait Implementations§
impl Freeze for ParallelBuilder
impl RefUnwindSafe for ParallelBuilder
impl Send for ParallelBuilder
impl Sync for ParallelBuilder
impl Unpin for ParallelBuilder
impl UnwindSafe for ParallelBuilder
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().