#[non_exhaustive]pub enum ProcessingMode {
Low,
Medium,
High,
}Expand description
How much work the correspondence mapping should put into a photo pair.
Each preset is a coarse-to-fine schedule of IterationParams. Higher settings both
run more iterations and finish at a higher working resolution, so cost grows faster
than the step count suggests.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Low
Fast, but may be less accurate.
Medium
Slower, but more accurate.
High
Slowest, but likely the best result.
Implementations§
Source§impl ProcessingMode
impl ProcessingMode
Sourcepub const ALL: [ProcessingMode; 3]
pub const ALL: [ProcessingMode; 3]
All modes, in increasing order of processing time.
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
The lowercase name of this mode, as accepted on the command line.
Sourcepub fn photo_width(&self) -> usize
pub fn photo_width(&self) -> usize
The working width to pass to PixelMapProcessor::new for this mode.
Sourcepub fn steps(&self) -> &'static [IterationParams]
pub fn steps(&self) -> &'static [IterationParams]
The iteration schedule of this mode.
Sourcepub fn run(&self, processor: &mut PixelMapProcessor)
pub fn run(&self, processor: &mut PixelMapProcessor)
Runs the whole schedule on an already initialized processor.
Sourcepub fn run_with_progress(
&self,
processor: &mut PixelMapProcessor,
on_step: impl FnMut(usize, usize),
)
pub fn run_with_progress( &self, processor: &mut PixelMapProcessor, on_step: impl FnMut(usize, usize), )
Runs the whole schedule, calling on_step(completed, total) after every
iteration. Useful for driving a progress indicator.
Trait Implementations§
Source§impl Clone for ProcessingMode
impl Clone for ProcessingMode
Source§fn clone(&self) -> ProcessingMode
fn clone(&self) -> ProcessingMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProcessingMode
Source§impl Debug for ProcessingMode
impl Debug for ProcessingMode
Source§impl Display for ProcessingMode
impl Display for ProcessingMode
impl Eq for ProcessingMode
Source§impl FromStr for ProcessingMode
impl FromStr for ProcessingMode
Source§impl PartialEq for ProcessingMode
impl PartialEq for ProcessingMode
impl StructuralPartialEq for ProcessingMode
Auto Trait Implementations§
impl Freeze for ProcessingMode
impl RefUnwindSafe for ProcessingMode
impl Send for ProcessingMode
impl Sync for ProcessingMode
impl Unpin for ProcessingMode
impl UnsafeUnpin for ProcessingMode
impl UnwindSafe for ProcessingMode
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
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> ⓘ
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> ⓘ
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